News for hackers. Stuff that matters.
Re:Talloc: The Tutorial by ExpiredLink on Sunday December 08, 2013 @05:42AM (#6869443)
> I wonder whether it was possible to make this more transparent for C programmers.

Actually, it is almost too transparent for C programmers:

>> From the programmer's point of view, the talloc context is completely equivalent to a pointer that would be returned by the memory routines from the C standard library.

Re:Talloc: The Tutorial by kyberias on Sunday December 08, 2013 @06:54AM (#6869534)
No, I get it, but I mean transparent so that stdlib malloc and free could be used. I understand it's not probably feasible.
Re:Talloc: The Tutorial by rkangel on Sunday December 08, 2013 @10:22AM (#6869898)
You'd never be able to make it just a drop in replacement, because it's not just about the allocation and freeing. The interesting stuff is specifying the hierarchies so that freeing a higher object frees lower ones too. Existing code using malloc/free wouldn't be doing that.
Re:Talloc: The Tutorial by morpher on Sunday December 08, 2013 @09:29AM (#6869744)
You could use LD_PRELOAD to load a library that does the replacement[1]. [1] http://stackoverflow.com/a/10008252