mirror of
https://github.com/nginx/nginx.git
synced 2025-06-08 18:22:40 +08:00
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).
This commit is contained in:
parent
83e35f6f22
commit
c22b87b2e4
@ -60,7 +60,7 @@ ngx_radix_tree_create(ngx_pool_t *pool, ngx_int_t preallocate)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (preallocate == -1) {
|
if (preallocate == -1) {
|
||||||
switch (ngx_pagesize / sizeof(ngx_radix_tree_t)) {
|
switch (ngx_pagesize / sizeof(ngx_radix_node_t)) {
|
||||||
|
|
||||||
/* amd64 */
|
/* amd64 */
|
||||||
case 128:
|
case 128:
|
||||||
|
Loading…
Reference in New Issue
Block a user