comparison src/core/ngx_radix_tree.c @ 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 d620f497c50f
children 6b416e3bdd26
comparison
equal deleted inserted replaced
4822:cf3e9e6a7624 4823:efa334556803
58 * 7 bits on sparc64 in 64-bit mode (8K pages) 58 * 7 bits on sparc64 in 64-bit mode (8K pages)
59 * 8 bits on sparc64 in 32-bit mode (8K pages) 59 * 8 bits on sparc64 in 32-bit mode (8K pages)
60 */ 60 */
61 61
62 if (preallocate == -1) { 62 if (preallocate == -1) {
63 switch (ngx_pagesize / sizeof(ngx_radix_tree_t)) { 63 switch (ngx_pagesize / sizeof(ngx_radix_node_t)) {
64 64
65 /* amd64 */ 65 /* amd64 */
66 case 128: 66 case 128:
67 preallocate = 6; 67 preallocate = 6;
68 break; 68 break;