awesome-c icon indicating copy to clipboard operation
awesome-c copied to clipboard

Add spaskalev/buddy_alloc

Open spaskalev opened this issue 3 years ago • 1 comments

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!

spaskalev avatar Jan 06 '22 17:01 spaskalev

Hi team. Please consider merging this - I continue to support and actively develop buddy_alloc. Thanks!

spaskalev avatar Dec 14 '23 08:12 spaskalev