Posted on 1 Comment

talloc: hierachical memory allocation by Andrew Tridgell

I’m just listening to a talk by Rusty Russell (an excellent speaker anyway) about Tridge’s talloc. It extends the traditional malloc() mechanism by making every returned pointer effectively be a memory pool. You can allocate memory that is “attached” to an existing pointer. When a parent pointer is freed, so are its children.

There are additional functions for stealing (re-attaching) a pointer to a different parent, optional destructors, and other useful trickery.

Tridge uses talloc in Samba4, and Rusty has also uses it in various places. Good stuff.

Posted on 1 Comment

1 thought on “talloc: hierachical memory allocation by Andrew Tridgell

  1. Rusty just posted some information about his talloc talk on his blog
    http://ozlabs.org/~rusty/

Comments are closed.