What if I don't free() all my dynamically allocated memory?

Peter da Silva peter at ficc.uu.net
Wed May 10 23:13:06 AEST 1989


The underlying operating system may not do it, but your C library's
implementation of malloc() should include code that automatically cleans
up memory when you exit(). I don't think this is in the standard, but it's
sure a quality of implementation issue.

As for operating systems that don't clean up when a program exits, there are
operating systems, particularly message-passing ones, that do not have the
notion of the owner of a block of memory. Memory is allocated and passed to
other programs continually.
-- 
Peter da Silva, Xenix Support, Ferranti International Controls Corporation.

Business: uunet.uu.net!ficc!peter, peter at ficc.uu.net, +1 713 274 5180.
Personal: ...!texbell!sugar!peter, peter at sugar.hackercorp.com.



More information about the Comp.lang.c mailing list