Traduisez - Übersetzen - Traduzca - Traduza - Tradurre - Translate

VanLUG Email Archive

VanLUG Mailing List
Re: Memory allocation under Linux

New Message Reply About this list Date view Thread view Subject view Author view

Brian Edmonds (brian@gweep.bc.ca)
Fri, 15 Jan 1999 22:19:45 -0800


Shane Wegner <shane@cm.nu> writes:
> In the following function, does s free itself?

As others have pointed out, memory allocated with malloc is not
self-freeing and must be freed explicitly. I didn't notice anyone
mention alloca(), however, which allocates memory on the stack, and is
thus self-freeing when the function returns.

Brian.


New Message Reply About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b3 on Fri 15 Jan 1999 - 22:20:01 PST