Welcome! Log In Create A New Profile

Advanced

[nginx] Slab: added comment about list heads.

December 07, 2016 02:30PM
details: http://hg.nginx.org/nginx/rev/ea12328518dc
branches:
changeset: 6824:ea12328518dc
user: Ruslan Ermilov <ru@nginx.com>
date: Wed Dec 07 22:25:37 2016 +0300
description:
Slab: added comment about list heads.

diffstat:

src/core/ngx_slab.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r 88c8c3d65184 -r ea12328518dc src/core/ngx_slab.c
--- a/src/core/ngx_slab.c Wed Dec 07 22:25:37 2016 +0300
+++ b/src/core/ngx_slab.c Wed Dec 07 22:25:37 2016 +0300
@@ -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;

+ /* only "next" is used in list head */
+ pool->free.slab = 0;
+ pool->free.next = page;
pool->free.prev = 0;
- pool->free.next = page;

page->slab = pages;
page->next = &pool->free;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Slab: added comment about list heads.

ru@nginx.com 282 December 07, 2016 02:30PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 102
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready