nginx-0.0.3-2004-06-06-23:49:18 import
diff --git a/src/core/ngx_config.h b/src/core/ngx_config.h
index 448e63a..0298315 100644
--- a/src/core/ngx_config.h
+++ b/src/core/ngx_config.h
@@ -40,19 +40,9 @@
 /* STUB: autoconf */
 typedef int    ngx_int_t;
 typedef u_int  ngx_uint_t;
-
-
 typedef int    ngx_flag_t;
 
 
-#ifndef NGX_SERVER_ROOT
-#define NGX_SERVER_ROOT   "./"
-#if 0
-#define NGX_SERVER_ROOT   "/usr/local/nginx/"
-#endif
-#endif
-
-
 #if !(WIN32)
 
 #define ngx_signal_helper(n)     SIG##n
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c
index 6382ec1..d5de076 100644
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -228,7 +228,7 @@
         fd /= 4;
 #endif
 
-        if (ngx_event_flags & NGX_USE_SIGIO_EVENT) {
+        if (ngx_event_flags & NGX_USE_RTSIG_EVENT) {
             if (cycle->connections[fd].read->active) {
                 ngx_del_conn(&cycle->connections[fd], NGX_CLOSE_EVENT);
             }
diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h
index ecd3c8b..8dbc4e4 100644
--- a/src/core/ngx_connection.h
+++ b/src/core/ngx_connection.h
@@ -103,6 +103,7 @@
 
     unsigned          pipeline:1;
     unsigned          unexpected_eof:1;
+    unsigned          timedout:1;
     signed            tcp_nopush:2;
 #if (HAVE_IOCP)
     unsigned          accept_context_updated:1;
diff --git a/src/core/ngx_core.h b/src/core/ngx_core.h
index ccb357b..1e194e7 100644
--- a/src/core/ngx_core.h
+++ b/src/core/ngx_core.h
@@ -26,6 +26,7 @@
 #include <ngx_parse.h>
 #include <ngx_log.h>
 #include <ngx_alloc.h>
+#include <ngx_palloc.h>
 #include <ngx_buf.h>
 #include <ngx_array.h>
 #include <ngx_table.h>
diff --git a/src/core/ngx_alloc.c b/src/core/ngx_palloc.c
similarity index 84%
rename from src/core/ngx_alloc.c
rename to src/core/ngx_palloc.c
index de583fc..65e2eed 100644
--- a/src/core/ngx_alloc.c
+++ b/src/core/ngx_palloc.c
@@ -3,35 +3,6 @@
 #include <ngx_core.h>
 
 
-void *ngx_alloc(size_t size, ngx_log_t *log)
-{
-    void  *p;
-
-    if (!(p = malloc(size))) {
-        ngx_log_error(NGX_LOG_EMERG, log, ngx_errno,
-                      "malloc() " SIZE_T_FMT " bytes failed", size);
-    }
-
-    ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, log, 0,
-                   "malloc: " PTR_FMT ":" SIZE_T_FMT, p, size);
-
-    return p;
-}
-
-
-void *ngx_calloc(size_t size, ngx_log_t *log)
-{
-    void  *p;
-
-    p = ngx_alloc(size, log);
-    if (p) {
-        ngx_memzero(p, size);
-    }
-
-    return p;
-}
-
-
 ngx_pool_t *ngx_create_pool(size_t size, ngx_log_t *log)
 {
     ngx_pool_t  *p;
@@ -99,7 +70,7 @@
     ngx_pool_t        *p, *n;
     ngx_pool_large_t  *large, *last;
 
-    if (size <= NGX_MAX_ALLOC_FROM_POOL) {
+    if (size <= (size_t) NGX_MAX_ALLOC_FROM_POOL) {
 
         for (p = pool, n = pool->next; /* void */; p = n, n = n->next) {
             m = ngx_align(p->last);
@@ -155,7 +126,7 @@
         large->next = NULL;
     }
 
-    if (!(p = ngx_alloc(size, pool->log))) {
+    if (!(p = ngx_memalign(ngx_pagesize, size, pool->log))) {
         return NULL;
     }
 
@@ -198,3 +169,30 @@
 
     return p;
 }
+
+#if 0
+
+static void *ngx_get_cached_block(size_t size)
+{
+    void                     *p;
+    ngx_cached_block_slot_t  *slot;
+
+    if (ngx_cycle->cache == NULL) {
+        return NULL;
+    }
+
+    slot = &ngx_cycle->cache[(size + ngx_pagesize - 1) / ngx_pagesize];
+
+    slot->tries++;
+
+    if (slot->number) {
+        p = slot->block;
+        slot->block = slot->block->next;
+        slot->number--;
+        return p;
+    }
+
+    return NULL;
+}
+
+#endif
diff --git a/src/core/ngx_alloc.h b/src/core/ngx_palloc.h
similarity index 81%
rename from src/core/ngx_alloc.h
rename to src/core/ngx_palloc.h
index e64f84f..7774d35 100644
--- a/src/core/ngx_alloc.h
+++ b/src/core/ngx_palloc.h
@@ -1,5 +1,5 @@
-#ifndef _NGX_ALLOC_H_INCLUDED_
-#define _NGX_ALLOC_H_INCLUDED_
+#ifndef _NGX_PALLOC_H_INCLUDED_
+#define _NGX_PALLOC_H_INCLUDED_
 
 
 #include <ngx_config.h>
@@ -7,11 +7,11 @@
 
 
 /*
- * NGX_MAX_ALLOC_FROM_POOL should be (NGX_PAGE_SIZE - 1), i.e. 4095 on x86.
+ * NGX_MAX_ALLOC_FROM_POOL should be (ngx_page_size - 1), i.e. 4095 on x86.
  * On FreeBSD 5.x it allows to use zero copy send.
  * On Windows NT it decreases a number of locked pages in a kernel.
  */
-#define NGX_MAX_ALLOC_FROM_POOL 4095
+#define NGX_MAX_ALLOC_FROM_POOL  (ngx_pagesize - 1)
 
 #define NGX_DEFAULT_POOL_SIZE   (16 * 1024)
 
@@ -48,7 +48,4 @@
 void ngx_pfree(ngx_pool_t *pool, void *p);
 
 
-#define ngx_free   free
-
-
-#endif /* _NGX_ALLOC_H_INCLUDED_ */
+#endif /* _NGX_PALLOC_H_INCLUDED_ */