Re: talloc_stack.c? On Mon, Jul 02, 2007 at 05:36:54PM +1000, tridge@samba.org wrote: > If there is a loop at one level then the stack idea won't really help > with the peak memory usage (which is really what matters).  If you have a strict loop then you might want to do something like for (i=0; i<1000; i++) { 	TALLOC_CTX *frame = talloc_stackframe(); 	do_something(); 	talloc_free(frame); } The point of the talloc stack is that in the general non-looping case the code is not cluttered at all and it correctly cleans up, and if you find peaks it is very easy to get rid of them. Volker