slab allocator is a compile-time option?

Steven Grimm sgrimm at
Mon Jun 12 19:17:35 UTC 2006

Simon Forman wrote:
> Is that a switch to configure or what?  I just looked for the option
> and didn't find it.  (It's not just in the facebook patch is it?)

It's in 1.1.12, though it may not be supported by the configure script. 
Add -DUSE_SYSTEM_MALLOC to your makefile's CFLAGS and recompile slabs.c. 
It causes the slabs_alloc() and slabs_free() functions to be wrappers 
around the system malloc() and free().

I tried it only briefly, saw that it ate more CPU time than the slab 
allocator, and lost interest. So I can't personally vouch for its 
stability. But it's definitely in the stock 1.1.12 code base.


More information about the memcached mailing list