Welcome! Log In Create A New Profile

Advanced

[nginx] Slab: fixed the number of pages calculation.

December 07, 2016 02:30PM
details: http://hg.nginx.org/nginx/rev/f6beb55792de
branches:
changeset: 6825:f6beb55792de
user: Ruslan Ermilov <ru@nginx.com>
date: Wed Dec 07 22:25:37 2016 +0300
description:
Slab: fixed the number of pages calculation.

When estimating the number of pages, do not count memory for slots.
In some cases this gives one extra usable memory page.

diffstat:

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

diffs (11 lines):

diff -r ea12328518dc -r f6beb55792de 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
@@ -120,6 +120,7 @@ ngx_slab_init(ngx_slab_pool_t *pool)
}

p += n * sizeof(ngx_slab_page_t);
+ size -= n * sizeof(ngx_slab_page_t);

pages = (ngx_uint_t) (size / (ngx_pagesize + sizeof(ngx_slab_page_t)));

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Slab: fixed the number of pages calculation.

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



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

Online Users

Guests: 72
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