comparison 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
comparison
equal deleted inserted replaced
1770:de50296a1ba1 1771:b794d78e52c5
56 56
57 #endif 57 #endif
58 58
59 59
60 #if (NGX_DEBUG_MALLOC) 60 #if (NGX_DEBUG_MALLOC)
61 #define ngx_slab_junk(p, size) ngx_memset(p, 0xD0, size) 61
62 #define ngx_slab_junk(p, size) ngx_memset(p, 0xD0, size)
63
62 #else 64 #else
65
66 #if (NGX_FREEBSD)
67
68 #define ngx_slab_junk(p, size) \
69 if (ngx_freebsd_debug_malloc) ngx_memset(p, 0xD0, size)
70
71 #else
72
63 #define ngx_slab_junk(p, size) 73 #define ngx_slab_junk(p, size)
74
75 #endif
76
64 #endif 77 #endif
65 78
66 static ngx_slab_page_t *ngx_slab_alloc_pages(ngx_slab_pool_t *pool, 79 static ngx_slab_page_t *ngx_slab_alloc_pages(ngx_slab_pool_t *pool,
67 ngx_uint_t pages); 80 ngx_uint_t pages);
68 static void ngx_slab_free_pages(ngx_slab_pool_t *pool, ngx_slab_page_t *page, 81 static void ngx_slab_free_pages(ngx_slab_pool_t *pool, ngx_slab_page_t *page,