diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2019-02-12 21:51:15 +0300 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2019-02-12 21:51:15 +0300 |
commit | d8ccef021588cf79d2dae7c132a0b1225ed52c30 (patch) | |
tree | 8f7d50e023106c1b235687862a45b1bca2a7f754 /src | |
parent | c5c034f66d55b6836c5c8fa19ab062dbaff009cd (diff) |
Slab: removed redundant page calculation (ticket #1721).
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ngx_slab.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/ngx_slab.c b/src/core/ngx_slab.c index 402387053..b8577ce75 100644 --- a/src/core/ngx_slab.c +++ b/src/core/ngx_slab.c @@ -635,10 +635,9 @@ ngx_slab_free_locked(ngx_slab_pool_t *pool, void *p) goto fail; } - n = ((u_char *) p - pool->start) >> ngx_pagesize_shift; size = slab & ~NGX_SLAB_PAGE_START; - ngx_slab_free_pages(pool, &pool->pages[n], size); + ngx_slab_free_pages(pool, page, size); ngx_slab_junk(p, size << ngx_pagesize_shift); |