3 ms·
Look up "buddy system allocator." The algorithm is super fast and easy to understand and implement. It was also the one used in the very first Linux kernels (p
by apenwarr 9y ago
Look up "buddy system allocator." The algorithm is super fast and easy to understand and implement. It was also the one used in the very first Linux kernels (probably for those reasons).
- nathell 9y agoIt still is, as the underlying page allocator for the SLAB/SLUB/SLOB allocators. See http://elixir.free-electrons.com/linux/latest/source/mm/page_alloc.c http://elixir.free-electrons.com/linux/latest/source/mm/page...
- gjm11 9y agoSuper-fast, sure, but it wastes a ton of space on typical workloads.