fix slab page or more sized allocations if nginx was build without debug

This commit is contained in:
Igor Sysoev 2009-01-25 10:39:59 +00:00
parent 7a86f07057
commit 4b2844b8a0

View File

@ -661,11 +661,8 @@ ngx_slab_alloc_pages(ngx_slab_pool_t *pool, ngx_uint_t pages)
} }
page->slab = pages | NGX_SLAB_PAGE_START; page->slab = pages | NGX_SLAB_PAGE_START;
#if (NGX_DEBUG)
page->next = NULL; page->next = NULL;
page->prev = NGX_SLAB_PAGE; page->prev = NGX_SLAB_PAGE;
#endif
if (--pages == 0) { if (--pages == 0) {
return page; return page;
@ -673,10 +670,8 @@ ngx_slab_alloc_pages(ngx_slab_pool_t *pool, ngx_uint_t pages)
for (p = page + 1; pages; pages--) { for (p = page + 1; pages; pages--) {
p->slab = NGX_SLAB_PAGE_BUSY; p->slab = NGX_SLAB_PAGE_BUSY;
#if (NGX_DEBUG)
p->next = NULL; p->next = NULL;
p->prev = NGX_SLAB_PAGE; p->prev = NGX_SLAB_PAGE;
#endif
p++; p++;
} }