first time user with out of memory question

Steven Grimm sgrimm at
Mon Jun 12 14:35:37 UTC 2006

Paul T wrote:
> Like memcached, sharedance is implemented on top of libevent. The code 
> is simpler, though, because it has no 'slabs', no mark and sweep 
> garbage collection e t.c.

Not to comment one way or another about sharedance, but memcached 
doesn't have mark and sweep garbage collection, as far as I'm aware. And 
the slab allocator is about as simple (and fast) a memory allocation 
scheme as it's possible to implement -- certainly much simpler than any 
decent-quality malloc implementation you're likely to run into.

In general, if you're getting "out of memory" errors when you try to 
store an item, you need to try the Facebook branch. That problem is 
fixed there. (You could also preallocate one item of each size when 
memcached starts up; that's what we did before I fixed the problem.)


More information about the memcached mailing list