summaryrefslogtreecommitdiffhomepage
path: root/src/os/unix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/os/unix/ngx_freebsd_config.h2
-rw-r--r--src/os/unix/ngx_freebsd_init.c14
-rw-r--r--src/os/unix/ngx_os.h1
3 files changed, 17 insertions, 0 deletions
diff --git a/src/os/unix/ngx_freebsd_config.h b/src/os/unix/ngx_freebsd_config.h
index f208bf16c..04524b452 100644
--- a/src/os/unix/ngx_freebsd_config.h
+++ b/src/os/unix/ngx_freebsd_config.h
@@ -79,5 +79,7 @@
#define HAVE_LITTLE_ENDIAN 1
+extern char *malloc_options;
+
#endif /* _NGX_FREEBSD_CONFIG_H_INCLUDED_ */
diff --git a/src/os/unix/ngx_freebsd_init.c b/src/os/unix/ngx_freebsd_init.c
index c755a3ec6..205617905 100644
--- a/src/os/unix/ngx_freebsd_init.c
+++ b/src/os/unix/ngx_freebsd_init.c
@@ -56,6 +56,20 @@ sysctl_t sysctls[] = {
};
+void ngx_debug_init()
+{
+#if (NGX_DEBUG)
+
+#if __FreeBSD_version >= 500014
+ _malloc_options = "J";
+#else
+ malloc_options = "J";
+#endif
+
+#endif
+}
+
+
int ngx_os_init(ngx_log_t *log)
{
int i, version;
diff --git a/src/os/unix/ngx_os.h b/src/os/unix/ngx_os.h
index 6f0a2e8b3..a106514d1 100644
--- a/src/os/unix/ngx_os.h
+++ b/src/os/unix/ngx_os.h
@@ -32,6 +32,7 @@ typedef struct {
} ngx_os_io_t;
+void ngx_debug_init();
int ngx_os_init(ngx_log_t *log);
int ngx_daemon(ngx_log_t *log);
int ngx_posix_init(ngx_log_t *log);