diff options
author | Ruslan Ermilov <ru@nginx.com> | 2016-12-07 22:25:37 +0300 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2016-12-07 22:25:37 +0300 |
commit | 4cf89436d10b32f9be4373e00c03518d713d1437 (patch) | |
tree | 9280f1c3f494155cc97beec87d9c5c13c3215f94 /src/core/ngx_slab.c | |
parent | 86f846a8bbe7ab9c45ee992a6185e0c8f0a710c3 (diff) |
Slab: added comment about list heads.
Diffstat (limited to 'src/core/ngx_slab.c')
-rw-r--r-- | src/core/ngx_slab.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/ngx_slab.c b/src/core/ngx_slab.c index b6473eaf7..4357e8dd9 100644 --- a/src/core/ngx_slab.c +++ b/src/core/ngx_slab.c @@ -113,6 +113,7 @@ ngx_slab_init(ngx_slab_pool_t *pool) n = ngx_pagesize_shift - pool->min_shift; for (i = 0; i < n; i++) { + /* only "next" is used in list head */ slots[i].slab = 0; slots[i].next = &slots[i]; slots[i].prev = 0; @@ -127,8 +128,10 @@ ngx_slab_init(ngx_slab_pool_t *pool) page = pool->pages; - pool->free.prev = 0; + /* only "next" is used in list head */ + pool->free.slab = 0; pool->free.next = page; + pool->free.prev = 0; page->slab = pages; page->next = &pool->free; |