vipps...@gmail.com writes:Maybe it's for alignment with the C standard. Ie, describing that fileOn Nov 1, 7:11 pm, Rainer Weikusat <rweiku...@mssgmbh.comwrote:Since programming initially running as this process is supposed to go
away 'soon' (it's only purpose is to start another program), there is
no point in returning memory to the malloc heap.You're wrong. IEEE 1003.1, 2004 doesn't guarantee that upon exit of
the program the memory will be freed.
That is true, but I'd be inclined to regard that as a defect in the
standard. The description of _exit() is so explicit about the many
things it frees and destroys that it is hard to imagine the authors
intended to require it to do all that, but not do something as basic as
free the process's memory.
descriptors are closed is OK because fds themselves are outside the
scope of the C standard (but malloc is not)
Nevertheless, every IEEE-1003.1-compliant, or otherwise Unix-like,Sorry, no. Perhaps someone over in comp.lang.c knows of some, I'm
operating system that I have ever encountered does indeed release the
process's memory when it exits, and this behavior is sufficiently
well-known and relied upon that any system that did not would be
regarded as unusable, IMHO. Are you aware of any counterexamples?
putting followups there.