comparison src/core/ngx_radix_tree.c @ 42:41ccba1aba45 NGINX_0_1_21

nginx 0.1.21 *) Bugfix: the ngx_http_stub_status_module showed incorrect statistics if "rtsig" method was used or if several worker process ran on SMP. *) Bugfix: nginx could not be built by the icc compiler on Linux or if the zlib-1.2.x library was building from sources. *) Bugfix: nginx could not be built on NetBSD 2.0.
author Igor Sysoev <http://sysoev.ru>
date Tue, 22 Feb 2005 00:00:00 +0300
parents 2879cd3a40cb
children 6cfc63e68377
comparison
equal deleted inserted replaced
41:4d8e7a81b3a0 42:41ccba1aba45
38 if (preallocate == 0) { 38 if (preallocate == 0) {
39 return tree; 39 return tree;
40 } 40 }
41 41
42 /* 42 /*
43 * We preallocate the first nodes: 0, 1, 00, 01, 10, 11, 000, 001, etc., 43 * The preallocation the first nodes: 0, 1, 00, 01, 10, 11, 000, 001, etc.
44 * to increase the TLB hits even if for the first lookup iterations. 44 * increases the TLB hits even if for the first lookup iterations.
45 * On the 32-bit platforms the 7 preallocated bits takes continuous 4K, 45 * On the 32-bit platforms the 7 preallocated bits takes continuous 4K,
46 * 8 - 8K, 9 - 16K, etc. On the 64-bit platforms the 6 preallocated bits 46 * 8 - 8K, 9 - 16K, etc. On the 64-bit platforms the 6 preallocated bits
47 * takes continuous 4K, 7 - 8K, 8 - 16K, etc. There is no sense to 47 * takes continuous 4K, 7 - 8K, 8 - 16K, etc. There is no sense to
48 * to preallocate more than one page, because further preallocation 48 * to preallocate more than one page, because further preallocation
49 * distribute the only bit per page. Instead, the random insertion 49 * distribute the only bit per page. Instead, the random insertion