Looking at kmalloc() and the SLUB Memory Allocator (2019)

29 pointsposted 4 months ago
by signa11

2 Comments

joha4270

4 months ago

So, either me or the author has misunderstood something. Memory allocators are not among my specialties, so it might very well be me, but:

> Being able to pre-allocate objects of fixed sizes and then offer up available objects to callers is much less work than allocating individual objects on demand.

At least, from reading his included code snippets I got the impression that what's actually happening is that it has multiple allocators to avoid fragmentation and that everything actually related to actually allocating does actually happen on demand.

shreyshri1999

4 months ago

Amazing chornology: SLOB, SLAB and now SLUB haha