awesome-c
awesome-c copied to clipboard
Add spaskalev/buddy_alloc
I wrote a custom buddy allocator with predictable storage and runtime costs.
It improves upon the textbook buddy allocator (e.g. the one TAOCP) in several ways
- Uses a optimal-fit strategy with a log complexity based on its tree depth. (not free lists)
- Supports non-power-of-two arena sizes
- Supports resizing arenas
- Supports rellocating the allocator and arena, for persistent heaps
- Metadata is external to the arena, making it safer from overwrites
- Full line and branch test coverage
It has been out for a while and seen some use in games - I think it might get some more publicity here, new users and further development. Thanks!
Hi team. Please consider merging this - I continue to support and actively develop buddy_alloc. Thanks!