[nginx] svn commit: r4824 - trunk/src/core

mdounin at mdounin.ru mdounin at mdounin.ru
Sat Aug 18 23:17:58 UTC 2012


Author: mdounin
Date: 2012-08-18 23:17:58 +0000 (Sat, 18 Aug 2012)
New Revision: 4824
URL: http://trac.nginx.org/nginx/changeset/4824/nginx

Log:
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).


Modified:
   trunk/src/core/ngx_radix_tree.c

Modified: trunk/src/core/ngx_radix_tree.c
===================================================================
--- trunk/src/core/ngx_radix_tree.c	2012-08-18 23:04:39 UTC (rev 4823)
+++ trunk/src/core/ngx_radix_tree.c	2012-08-18 23:17:58 UTC (rev 4824)
@@ -60,7 +60,7 @@
      */
 
     if (preallocate == -1) {
-        switch (ngx_pagesize / sizeof(ngx_radix_tree_t)) {
+        switch (ngx_pagesize / sizeof(ngx_radix_node_t)) {
 
         /* amd64 */
         case 128:



More information about the nginx-devel mailing list