diff options
-rw-r--r-- | slabs.c | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -235,17 +235,6 @@ static void *do_slabs_alloc(const size_t size, unsigned int id) { p = &slabclass[id]; assert(p->sl_curr == 0 || ((item *)p->slots)->slabs_clsid == 0); -#ifdef USE_SYSTEM_MALLOC - if (mem_limit && mem_malloced + size > mem_limit) { - MEMCACHED_SLABS_ALLOCATE_FAILED(size, id); - return 0; - } - mem_malloced += size; - ret = malloc(size); - MEMCACHED_SLABS_ALLOCATE(size, id, 0, ret); - return ret; -#endif - /* fail unless we have space at the end of a recently allocated page, we have something on our freelist, or we could allocate a new page */ if (! (p->sl_curr != 0 || do_slabs_newslab(id) != 0)) { @@ -282,12 +271,6 @@ static void do_slabs_free(void *ptr, const size_t size, unsigned int id) { MEMCACHED_SLABS_FREE(size, id, ptr); p = &slabclass[id]; -#ifdef USE_SYSTEM_MALLOC - mem_malloced -= size; - free(ptr); - return; -#endif - it = (item *)ptr; it->it_flags |= ITEM_SLABBED; it->prev = 0; |