Hierarchical memory allocation in C

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Hierarchical memory allocation in C

Nathan Kurz
I was recently researching memory allocators and came across talloc:
http://samba.org/ftp/unpacked/talloc/talloc_guide.txt

Talloc has a cool interface: "talloc is a hierarchical, reference
counted memory pool system with destructors."    It's main uniqueness
is that every allocation address returned can also be used as a
context for future allocations, so that all the components of an
object can very simply be allocated as belonging to that object.

Good short explanation here:
http://foss.in/2007/register/slides/talloc__The_Power_of_C_509.pdf

I've never actually used it, but it's probably worth 15 minutes of
exploration to determine if this might be an interface worth swiping
for Lucy at some point.

Nathan Kurz
[hidden email]