mirror of
https://github.com/nginx/nginx.git
synced 2024-12-19 05:33:52 -06:00
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:
parent
4cf89436d1
commit
16de9fc3b5
@ -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)));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user