spaskalev / buddy_alloc

A single header buddy memory allocator for C & C++

Home Page:https://spaskalev.github.io/buddy_alloc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a way to visualize the state of the allocator

spaskalev opened this issue · comments

While the buddy_debug and buddy_tree_debug functions will print out the internal state of the allocator their output can be hard to interpret by users. Visualizing the output graphically can help understanding the allocator better.

This is now tending towards a dual histogram of allocated slots and free slots.

The buddy_walk function callback now has an extra parameter allocated of size_t and the callback will get invoked for free slots. This way the allocator state can be queried and visualised as needed.