home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / programm / 4579 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  932 b 

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