From: Ruslan Ermilov Date: Wed, 7 Dec 2016 19:25:37 +0000 (+0300) Subject: Slab: fixed the number of pages calculation. X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=16de9fc3b52e82d1e2be740be4a1ee9adafb6fbf;p=nginx.git Slab: fixed the number of pages calculation. When estimating the number of pages, do not count memory for slots. In some cases this gives one extra usable memory page. --- diff --git a/src/core/ngx_slab.c b/src/core/ngx_slab.c index 4357e8dd9..b33f43f8e 100644 --- a/src/core/ngx_slab.c +++ b/src/core/ngx_slab.c @@ -120,6 +120,7 @@ ngx_slab_init(ngx_slab_pool_t *pool) } p += n * sizeof(ngx_slab_page_t); + size -= n * sizeof(ngx_slab_page_t); pages = (ngx_uint_t) (size / (ngx_pagesize + sizeof(ngx_slab_page_t)));