summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_port_memory.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2018-02-09 19:07:55 +0300
committerValentin Bartenev <vbart@nginx.com>2018-02-09 19:07:55 +0300
commit24d07cfdd2b660d11e3ba7f5e77a6c690bfff8ad (patch)
treed1b85adebedad36ef9d71d00279f3fd380aa62ce /src/nxt_port_memory.c
parentfc496c19ac124c7412e1539d15dd99decc4ecd33 (diff)
downloadunit-24d07cfdd2b660d11e3ba7f5e77a6c690bfff8ad.tar.gz
unit-24d07cfdd2b660d11e3ba7f5e77a6c690bfff8ad.tar.bz2
Made nxt_assert() statements to be compiled only with debug.
Diffstat (limited to 'src/nxt_port_memory.c')
-rw-r--r--src/nxt_port_memory.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nxt_port_memory.c b/src/nxt_port_memory.c
index a44cee01..31bab352 100644
--- a/src/nxt_port_memory.c
+++ b/src/nxt_port_memory.c
@@ -527,14 +527,20 @@ nxt_port_mmap_tracking_cancel(nxt_task_t *task,
nxt_int_t
nxt_port_mmap_tracking_write(uint32_t *buf, nxt_port_mmap_tracking_t *t)
{
- nxt_atomic_t *tracking;
nxt_port_mmap_handler_t *mmap_handler;
mmap_handler = t->mmap_handler;
+
+#if (NXT_DEBUG)
+ {
+ nxt_atomic_t *tracking;
+
tracking = mmap_handler->hdr->tracking;
nxt_assert(t->tracking >= tracking);
nxt_assert(t->tracking < tracking + PORT_MMAP_CHUNK_COUNT);
+ }
+#endif
buf[0] = mmap_handler->hdr->id;
buf[1] = t->tracking - mmap_handler->hdr->tracking;