comparison src/core/ngx_radix_tree.c @ 426:e7dbea1ee115 NGINX_0_7_25

nginx 0.7.25 *) Change: in subrequest processing. *) Change: now POSTs without "Content-Length" header line are allowed. *) Bugfix: now the "limit_req" and "limit_conn" directives log a prohibition reason. *) Bugfix: in the "delete" parameter of the "geo" directive.
author Igor Sysoev <http://sysoev.ru>
date Mon, 08 Dec 2008 00:00:00 +0300
parents a094317ba307
children
comparison
equal deleted inserted replaced
425:f64d9e30046c 426:e7dbea1ee115
40 if (preallocate == 0) { 40 if (preallocate == 0) {
41 return tree; 41 return tree;
42 } 42 }
43 43
44 /* 44 /*
45 * The preallocation the first nodes: 0, 1, 00, 01, 10, 11, 000, 001, etc. 45 * Preallocation of first nodes : 0, 1, 00, 01, 10, 11, 000, 001, etc.
46 * increases the TLB hits even if for the first lookup iterations. 46 * increases TLB hits even if for first lookup iterations.
47 * On the 32-bit platforms the 7 preallocated bits takes continuous 4K, 47 * On 32-bit platforms the 7 preallocated bits takes continuous 4K,
48 * 8 - 8K, 9 - 16K, etc. On the 64-bit platforms the 6 preallocated bits 48 * 8 - 8K, 9 - 16K, etc. On 64-bit platforms the 6 preallocated bits
49 * takes continuous 4K, 7 - 8K, 8 - 16K, etc. There is no sense to 49 * takes continuous 4K, 7 - 8K, 8 - 16K, etc. There is no sense to
50 * to preallocate more than one page, because further preallocation 50 * to preallocate more than one page, because further preallocation
51 * distributes the only bit per page. Instead, the random insertion 51 * distributes the only bit per page. Instead, a random insertion
52 * may distribute several bits per page. 52 * may distribute several bits per page.
53 * 53 *
54 * Thus, by default we preallocate maximum 54 * Thus, by default we preallocate maximum
55 * 6 bits on amd64 (64-bit platform and 4K pages) 55 * 6 bits on amd64 (64-bit platform and 4K pages)
56 * 7 bits on i386 (32-bit platform and 4K pages) 56 * 7 bits on i386 (32-bit platform and 4K pages)