kernel malloc usage

Bruce M Simpson bms at spc.org
Mon Nov 3 02:59:34 PST 2003


On Mon, Nov 03, 2003 at 10:51:58AM +0100, Gerald Heinig wrote:
> Is this true? I seem to remember that FreeBSD has a slab allocator,
> which IIRC is particularly good at allocating small chunks.

You don't specify which version of the kernel you're programming to; so
I'll assume 5.x.

If your allocations are of similar size, then consider using the zone
allocator; I believe this implements a slab-like algorithm.

BMS


More information about the freebsd-hackers mailing list