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.
This commit is contained in:
Ruslan Ermilov 2016-12-07 22:25:37 +03:00
parent 4cf89436d1
commit 16de9fc3b5

View File

@ -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)));