August 18, 2012 09:23AM
45: /*
46: * Preallocation of first nodes : 0, 1, 00, 01, 10, 11, 000, 001, etc.
47: * increases TLB hits even if for first lookup iterations.
48: * On 32-bit platforms the 7 preallocated bits takes continuous 4K,
49: * 8 - 8K, 9 - 16K, etc. On 64-bit platforms the 6 preallocated bits
50: * takes continuous 4K, 7 - 8K, 8 - 16K, etc. There is no sense to
51: * to preallocate more than one page, because further preallocation
52: * distributes the only bit per page. Instead, a random insertion
53: * may distribute several bits per page.
54: *
55: * Thus, by default we preallocate maximum
56: * 6 bits on amd64 (64-bit platform and 4K pages)
57: * 7 bits on i386 (32-bit platform and 4K pages)
58: * 7 bits on sparc64 in 64-bit mode (8K pages)
59: * 8 bits on sparc64 in 32-bit mode (8K pages)
60: */
61:
62: if (preallocate == -1) {
63: switch (ngx_pagesize / sizeof(ngx_radix_tree_t)) { //ngx_radix_tree_t -> ngx_radix_node_t ?

Thanks in advance.
Subject Author Posted

Is this a bug?

lenky0401 August 18, 2012 09:23AM

Re: Is this a bug?

Maxim Dounin August 18, 2012 07:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 147
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready