Mercurial > hg > nginx-quic
comparison src/core/ngx_slab.c @ 2464:ae3bfe9aa093
fix slab page or more sized allocations if nginx was build without debug
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 25 Jan 2009 10:39:59 +0000 |
parents | 8e603804d0c1 |
children | 3a9b22405138 |
comparison
equal
deleted
inserted
replaced
2463:4bc8ea10d62b | 2464:ae3bfe9aa093 |
---|---|
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 } |