home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!think.com!barmar
- From: barmar@think.com (Barry Margolin)
- Newsgroups: comp.unix.programmer
- Subject: Re: malloc() and free()
- Date: 9 Sep 1992 05:06:20 GMT
- Organization: Thinking Machines Corporation, Cambridge MA, USA
- Lines: 12
- Message-ID: <18k0ocINNjt5@early-bird.think.com>
- References: <1992Sep8.171947@is.morgan.com>
- NNTP-Posting-Host: gandalf.think.com
-
- In article <1992Sep8.171947@is.morgan.com> scairns@is.morgan.com (Scott Cairns) writes:
- >It's always been my understanding that this memory has been free()'d
- >but only to the process which initially malloc()'ed it. Is this
- >correct? If so, how does that process reuse this freed memory?
-
- Yes, in most Unix implementations of free(3), the memory is not returned to
- the OS. Future malloc(3) calls by that process may reuse the freed memory.
- --
- Barry Margolin
- System Manager, Thinking Machines Corp.
-
- barmar@think.com {uunet,harvard}!think!barmar
-