From 5e593aa34ed51cb68670eca25506294165168b93 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Sat, 22 Dec 2007 11:06:53 +0000 Subject: take MALLOC_OPTIONS=J into account in slab allocator --- src/core/ngx_slab.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ngx_slab.c b/src/core/ngx_slab.c index 9f63a91eb..b187026d8 100644 --- 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, -- cgit