diff src/core/ngx_slab.c @ 1771:b794d78e52c5

take MALLOC_OPTIONS=J into account in slab allocator
author Igor Sysoev <igor@sysoev.ru>
date Sat, 22 Dec 2007 11:06:53 +0000
parents 31622d9f2c0d
children 8e603804d0c1 7ea0c388473e
line wrap: on
line diff
--- a/src/core/ngx_slab.c
+++ b/src/core/ngx_slab.c
@@ -58,9 +58,22 @@
 
 
 #if (NGX_DEBUG_MALLOC)
-#define ngx_slab_junk(p, size)  ngx_memset(p, 0xD0, size)
+
+#define ngx_slab_junk(p, size)     ngx_memset(p, 0xD0, size)
+
 #else
+
+#if (NGX_FREEBSD)
+
+#define ngx_slab_junk(p, size)                                                \
+    if (ngx_freebsd_debug_malloc)  ngx_memset(p, 0xD0, size)
+
+#else
+
 #define ngx_slab_junk(p, size)
+
+#endif
+
 #endif
 
 static ngx_slab_page_t *ngx_slab_alloc_pages(ngx_slab_pool_t *pool,