          }
 diff -urx '*~' -x '*.swp' nginx-1.2.1/src/core/ngx_palloc.h nginx-1.2.1-patched/src/core/ngx_palloc.h
 --- nginx-1.2.1/src/core/ngx_palloc.h	2012-02-06 04:02:59.000000000 +0800
-+++ nginx-1.2.1-patched/src/core/ngx_palloc.h	2012-06-04 19:39:32.803578356 +0800
-@@ -39,6 +39,8 @@
- 
- 
- typedef struct ngx_pool_large_s  ngx_pool_large_t;
++++ nginx-1.2.1-patched/src/core/ngx_palloc.h	2012-06-21 10:35:47.463405863 +0800
+@@ -38,28 +38,21 @@
+ };
+ 
+ 
+-typedef struct ngx_pool_large_s  ngx_pool_large_t;
+-
+-struct ngx_pool_large_s {
+-    ngx_pool_large_t     *next;
+-    void                 *alloc;
+-};
++typedef struct ngx_pool_data_s   ngx_pool_large_t;
 +typedef struct ngx_pool_data_s   ngx_pool_data_t;
-+
- 
- struct ngx_pool_large_s {
-     ngx_pool_large_t     *next;
-@@ -46,16 +48,14 @@
- };
  
  
 -typedef struct {

+        new = ngx_palloc(p, nalloc * a->size);
+        if (new == NULL) {
+            return NULL;
         }
+
+        ngx_memcpy(new, a->elts, a->nelts * a->size);
+
+        ngx_pfree(p, a->elts);
+
+        a->elts = new;
+        a->nalloc = nalloc;
     }
 
     elt = (u_char *) a->elts + a->size * a->nelts;
diff -urx '*~' -x '*.swp' nginx-1.2.1/src/core/ngx_palloc.c nginx-1.2.1-patched/src/core/ngx_palloc.c
--- nginx-1.2.1/src/core/ngx_palloc.c	2012-02-06 04:02:59.000000000 +0800
+++ nginx-1.2.1-patched/src/core/ngx_palloc.c	2012-06-04 20:02:26.667925891 +0800
@@ -9,32 +9,23 @@
 #include <ngx_core.h>
 

     ngx_pool_t  *p;
 
-    size = n * a->size;
+    ngx_array_link_t    *link;
 
     if (a->nelts + n > a->nalloc) {
 
@@ -113,31 +115,27 @@
 
         p = a->pool;
 
