Mercurial > hg > nginx
comparison src/core/ngx_slab.c @ 4224:4c4997de65b8
Using of junk value in slab allocator similar to modern FreeBSD values.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 24 Oct 2011 15:50:19 +0000 |
parents | 1b779cb69dc8 |
children | d620f497c50f |
comparison
equal
deleted
inserted
replaced
4223:1b779cb69dc8 | 4224:4c4997de65b8 |
---|---|
40 #endif | 40 #endif |
41 | 41 |
42 | 42 |
43 #if (NGX_DEBUG_MALLOC) | 43 #if (NGX_DEBUG_MALLOC) |
44 | 44 |
45 #define ngx_slab_junk(p, size) ngx_memset(p, 0xD0, size) | 45 #define ngx_slab_junk(p, size) ngx_memset(p, 0xA5, size) |
46 | 46 |
47 #else | 47 #else |
48 | 48 |
49 #if (NGX_HAVE_DEBUG_MALLOC) | 49 #if (NGX_HAVE_DEBUG_MALLOC) |
50 | 50 |
51 #define ngx_slab_junk(p, size) \ | 51 #define ngx_slab_junk(p, size) \ |
52 if (ngx_debug_malloc) ngx_memset(p, 0xD0, size) | 52 if (ngx_debug_malloc) ngx_memset(p, 0xA5, size) |
53 | 53 |
54 #else | 54 #else |
55 | 55 |
56 #define ngx_slab_junk(p, size) | 56 #define ngx_slab_junk(p, size) |
57 | 57 |