Mercurial > hg > nginx
diff src/os/unix/ngx_freebsd_init.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 | 0b592a68aade |
children | cc13ff6d5c07 |
line wrap: on
line diff
--- a/src/os/unix/ngx_freebsd_init.c +++ b/src/os/unix/ngx_freebsd_init.c @@ -23,8 +23,9 @@ int ngx_freebsd_machdep_hlt_logical_ int ngx_freebsd_kern_ipc_zero_copy_send; -ngx_uint_t ngx_freebsd_sendfile_nbytes_bug; -ngx_uint_t ngx_freebsd_use_tcp_nopush; +ngx_uint_t ngx_freebsd_sendfile_nbytes_bug; +ngx_uint_t ngx_freebsd_use_tcp_nopush; +ngx_uint_t ngx_freebsd_debug_malloc; static ngx_os_io_t ngx_freebsd_io = { @@ -86,6 +87,16 @@ ngx_debug_init() malloc_options = "J"; #endif + ngx_freebsd_debug_malloc = 1; + +#else + char *mo; + + mo = getenv("MALLOC_OPTIONS"); + + if (mo && ngx_strchr(mo, 'J')) { + ngx_freebsd_debug_malloc = 1; + } #endif }