comparison src/core/ngx_slab.c @ 2476:7ea0c388473e stable-0.6

fix slab page or more sized allocations if nginx was build without debug
author Igor Sysoev <igor@sysoev.ru>
date Mon, 26 Jan 2009 15:24:14 +0000
parents b794d78e52c5
children
comparison
equal deleted inserted replaced
2475:774d6ed89c56 2476:7ea0c388473e
659 p->next = page->next; 659 p->next = page->next;
660 page->next->prev = page->prev; 660 page->next->prev = page->prev;
661 } 661 }
662 662
663 page->slab = pages | NGX_SLAB_PAGE_START; 663 page->slab = pages | NGX_SLAB_PAGE_START;
664
665 #if (NGX_DEBUG)
666 page->next = NULL; 664 page->next = NULL;
667 page->prev = NGX_SLAB_PAGE; 665 page->prev = NGX_SLAB_PAGE;
668 #endif
669 666
670 if (--pages == 0) { 667 if (--pages == 0) {
671 return page; 668 return page;
672 } 669 }
673 670
674 for (p = page + 1; pages; pages--) { 671 for (p = page + 1; pages; pages--) {
675 p->slab = NGX_SLAB_PAGE_BUSY; 672 p->slab = NGX_SLAB_PAGE_BUSY;
676 #if (NGX_DEBUG)
677 p->next = NULL; 673 p->next = NULL;
678 p->prev = NGX_SLAB_PAGE; 674 p->prev = NGX_SLAB_PAGE;
679 #endif
680 p++; 675 p++;
681 } 676 }
682 677
683 return page; 678 return page;
684 } 679 }