Article View: comp.std.c
Article #4035Is malloc()ed storage freed upon program termination?
From: Jim Hennessy
Date: Tue, 19 Sep 1995 00:00
Date: Tue, 19 Sep 1995 00:00
7 lines
911 bytes
911 bytes
Does the C standard guarantee that storage allocated by malloc() is freed during program termination? If so, where? I can't find it. In other words, is it safe to exit the program without using free() to deallocate storage which was allocated via malloc()? I know most operating systems free the storage, but I'm wondering if it's guaranteed, and thus safe on any operating system.
Technical Details
Message-ID:
<43l16d$3dp@homer.alpha.net>Path:
arc1-ca.pugleaf.net!homer.alpha.net!earth!jimhShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!homer.alpha.net!earth!jimh From: jimh@earth.execpc.com (Jim Hennessy) Newsgroups: comp.std.c Subject: Is malloc()ed storage freed upon program termination? Date: 19 Sep 1995 00:00:13 GMT Organization: Exec-PC -- (800)-EXECPC-1 Message-ID: <43l16d$3dp@homer.alpha.net> Reply-To: jph@vnet.ibm.com (Jim Hennessy) NNTP-Posting-Host: earth.execpc.com Summary: Is it safe to acquire storage and never release it? Keywords: malloc, program, process, termination, free X-Newsreader: TIN [version 1.2 PL2]