Mercurial > hg > nginx-quic
comparison src/core/ngx_radix_tree.c @ 2366:3aa4fd0e7dc5
fix comment
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 02 Dec 2008 16:50:56 +0000 |
parents | 78415b0469bc |
children | 62be1c4edfba d620f497c50f |
comparison
equal
deleted
inserted
replaced
2365:8522a901df2f | 2366:3aa4fd0e7dc5 |
---|---|
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) |