aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_freebsd_init.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-12-22 11:06:53 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-12-22 11:06:53 +0000
commit5e593aa34ed51cb68670eca25506294165168b93 (patch)
tree05b354b528ad7c1d0d72f1ce578b7432b154b4cc /src/os/unix/ngx_freebsd_init.c
parentdc3bbea15cc342025f08c3553ac36e145779727d (diff)
downloadnginx-5e593aa34ed51cb68670eca25506294165168b93.tar.gz
nginx-5e593aa34ed51cb68670eca25506294165168b93.zip
take MALLOC_OPTIONS=J into account in slab allocator
Diffstat (limited to 'src/os/unix/ngx_freebsd_init.c')
-rw-r--r--src/os/unix/ngx_freebsd_init.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/os/unix/ngx_freebsd_init.c b/src/os/unix/ngx_freebsd_init.c
index 26499bd32..a2b4c5731 100644
--- 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_cpus;
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
}