diff options
author | dormando <dormando@rydia.net> | 2012-07-27 02:33:17 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2012-07-27 12:47:16 -0700 |
commit | 72437011017e9a1f25d53da95f1ac63592488bcc (patch) | |
tree | 4ae34877c0f13e15d09b09c2485e2ab6ab875d3c | |
parent | 3b2dc737567f3ee30006be82bad004f193d83025 (diff) | |
download | memcached-72437011017e9a1f25d53da95f1ac63592488bcc.tar.gz |
Remove USE_SYSTEM_MALLOC define
bitrotted. only existed to prove a point. can add it back in better later, or
use a storage engine if we ever get on 1.6.
-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; |