mirror of
https://github.com/nginx/nginx.git
synced 2026-06-25 19:37:00 +00:00
align to minimum of a page and a pool sizes
This commit is contained in:
parent
104ff87c39
commit
a4a0541308
1 changed files with 2 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ ngx_create_pool(size_t size, ngx_log_t *log)
|
|||
{
|
||||
ngx_pool_t *p;
|
||||
|
||||
p = ngx_memalign(ngx_pagesize, size, log);
|
||||
p = ngx_memalign(ngx_min(ngx_pagesize, size), size, log);
|
||||
if (p == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -181,7 +181,7 @@ ngx_palloc_block(ngx_pool_t *pool, size_t size)
|
|||
|
||||
psize = (size_t) (pool->d.end - (u_char *) pool);
|
||||
|
||||
m = ngx_memalign(ngx_pagesize, psize, pool->log);
|
||||
m = ngx_memalign(ngx_min(ngx_pagesize, psize), psize, pool->log);
|
||||
if (m == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue