changeset 4823:efa334556803

Radix tree preallocation fix. The preallocation size was calculated incorrectly and was always 8 due to sizeof(ngx_radix_tree_t) accidentally used instead of sizeof(ngx_radix_node_t).
author Maxim Dounin <mdounin@mdounin.ru>
date Sat, 18 Aug 2012 23:17:58 +0000
parents cf3e9e6a7624
children 90f3b4ea7992
files src/core/ngx_radix_tree.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/ngx_radix_tree.c
+++ b/src/core/ngx_radix_tree.c
@@ -60,7 +60,7 @@ ngx_radix_tree_create(ngx_pool_t *pool, 
      */
 
     if (preallocate == -1) {
-        switch (ngx_pagesize / sizeof(ngx_radix_tree_t)) {
+        switch (ngx_pagesize / sizeof(ngx_radix_node_t)) {
 
         /* amd64 */
         case 128: