Mercurial > hg > nginx-quic
comparison 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 |
comparison
equal
deleted
inserted
replaced
1770:de50296a1ba1 | 1771:b794d78e52c5 |
---|---|
21 | 21 |
22 /* FreeBSD 5.0 */ | 22 /* FreeBSD 5.0 */ |
23 int ngx_freebsd_kern_ipc_zero_copy_send; | 23 int ngx_freebsd_kern_ipc_zero_copy_send; |
24 | 24 |
25 | 25 |
26 ngx_uint_t ngx_freebsd_sendfile_nbytes_bug; | 26 ngx_uint_t ngx_freebsd_sendfile_nbytes_bug; |
27 ngx_uint_t ngx_freebsd_use_tcp_nopush; | 27 ngx_uint_t ngx_freebsd_use_tcp_nopush; |
28 ngx_uint_t ngx_freebsd_debug_malloc; | |
28 | 29 |
29 | 30 |
30 static ngx_os_io_t ngx_freebsd_io = { | 31 static ngx_os_io_t ngx_freebsd_io = { |
31 ngx_unix_recv, | 32 ngx_unix_recv, |
32 ngx_readv_chain, | 33 ngx_readv_chain, |
84 _malloc_options = "J"; | 85 _malloc_options = "J"; |
85 #else | 86 #else |
86 malloc_options = "J"; | 87 malloc_options = "J"; |
87 #endif | 88 #endif |
88 | 89 |
90 ngx_freebsd_debug_malloc = 1; | |
91 | |
92 #else | |
93 char *mo; | |
94 | |
95 mo = getenv("MALLOC_OPTIONS"); | |
96 | |
97 if (mo && ngx_strchr(mo, 'J')) { | |
98 ngx_freebsd_debug_malloc = 1; | |
99 } | |
89 #endif | 100 #endif |
90 } | 101 } |
91 | 102 |
92 | 103 |
93 ngx_int_t | 104 ngx_int_t |