diff src/core/nginx.c @ 7081:69f9ee0342db

Slab: fixed initialization on win32. On Windows, a worker process does not call ngx_slab_init() from ngx_init_zone_pool(), so ngx_slab_max_size, ngx_slab_exact_size, and ngx_slab_exact_shift were left uninitialized.
author Ruslan Ermilov <ru@nginx.com>
date Tue, 08 Aug 2017 15:16:01 +0300
parents 97c99bb43737
children 8b84d60ef13d
line wrap: on
line diff
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -273,6 +273,12 @@ main(int argc, char *const *argv)
         return 1;
     }
 
+    /*
+     * ngx_slab_sizes_init() requires ngx_pagesize set in ngx_os_init()
+     */
+
+    ngx_slab_sizes_init();
+
     if (ngx_add_inherited_sockets(&init_cycle) != NGX_OK) {
         return 1;
     }