> > It still has a weakness of not being able to reassign memory if you put it > > all into one slab class pool. > > I have 16 fixed sizes (ranging from 1K-6K, all slightly irregular size > [e.g. 1028 bytes]), so I will use the slab allocator every time I need > one of these fixed sizes. So I will have 16 different slab-classes > (unsure of terminology) and there may be minimal overhead (possibly > 1MB per slab-class that is underunused) but I can live w/ that. > > Are my assumptions correct?
If you change the slabs_init routine to presize your exact slab classes, that'll work. Keep in mind that the slab allocator doesn't handle re-allocating memory across slabs. Once memory is given to a slab class, that's it.
