]> git.kaiwu.me - nginx.git/commitdiff
Slab: commented bitmap initialization for small allocations.
authorRuslan Ermilov <ru@nginx.com>
Thu, 8 Dec 2016 14:22:07 +0000 (17:22 +0300)
committerRuslan Ermilov <ru@nginx.com>
Thu, 8 Dec 2016 14:22:07 +0000 (17:22 +0300)
src/core/ngx_slab.c

index 6695bb32787e1a16d7f91eee8c4b6af990c5fe5b..66faecc74b0df21fea654c68a6e9c388924f9411 100644 (file)
@@ -338,6 +338,7 @@ ngx_slab_alloc_locked(ngx_slab_pool_t *pool, size_t size)
                 n = 1;
             }
 
+            /* "n" elements for bitmap, plus one requested */
             bitmap[0] = ((uintptr_t) 2 << n) - 1;
 
             map = (ngx_pagesize >> shift) / (sizeof(uintptr_t) * 8);