aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_slab.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-10-28 14:20:13 +0000
committerIgor Sysoev <igor@sysoev.ru>2006-10-28 14:20:13 +0000
commite6d99d831cf7a8eac1f554bf0a07d67664a3bb92 (patch)
tree960850c99895082be62bbd3ce1faf4cf69b055c0 /src/core/ngx_slab.c
parenta994bd0ae2a2b7f268f050c70e281e3081916d22 (diff)
downloadnginx-e6d99d831cf7a8eac1f554bf0a07d67664a3bb92.tar.gz
nginx-e6d99d831cf7a8eac1f554bf0a07d67664a3bb92.zip
bad commit
Diffstat (limited to 'src/core/ngx_slab.c')
-rw-r--r--src/core/ngx_slab.c37
1 files changed, 35 insertions, 2 deletions
diff --git a/src/core/ngx_slab.c b/src/core/ngx_slab.c
index 7b23d3c14..44d31f538 100644
--- a/src/core/ngx_slab.c
+++ b/src/core/ngx_slab.c
@@ -4,8 +4,41 @@
*/
+typedef struct ngx_slab_map_s ngx_slab_map_t;
-void *ngx_slab_alloc(ngx_slab_pool_t *pool, size_t size)
+struct ngx_http_slab_map_s {
+ uintptr_t mask;
+ ngx_slab_elt_t *next;
+};
+
+
+typedef struct {
+ ngx_slab_elt_t *slabs;
+
+ ngx_slab_elt_t *map;
+ size_t map_size;
+
+ size_t size;
+
+} ngx_slab_t;
+
+
+void *
+ngx_slab_init(ngx_slab_pool_t *pool, size_t size)
{
- return NULL;
+ slab->map_size = (slab->size + ngx_pagesize - 1)
+ / (ngx_pagesize / sizeof(ngx_slab_map_t));
+
+
+ return NULL;
+}
+
+
+void *
+ngx_slab_alloc(ngx_slab_t *pool, size_t size)
+{
+ n = size - 1;
+
+
+ return NULL;
}