home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / atari / st / tech / 6465 < prev    next >
Encoding:
Text File  |  1993-01-04  |  1.5 KB  |  32 lines

  1. Newsgroups: comp.sys.atari.st.tech
  2. Path: sparky!uunet!munnari.oz.au!spool.mu.edu!agate!doc.ic.ac.uk!warwick!dcs.warwick.ac.uk!leo
  3. From: leo@dcs.warwick.ac.uk (Leo Hendry)
  4. Subject: Re: Malloc (Was: Sending objc_draw to a buffer)
  5. Message-ID: <1993Jan4.203951.6091@dcs.warwick.ac.uk>
  6. Sender: news@dcs.warwick.ac.uk (Network News)
  7. Nntp-Posting-Host: granite
  8. Organization: Department of Computer Science, Warwick University, England
  9. References: <2b3de6cf@p15.f202.n281.z2.fidonet> <1993Jan3.035343.15539@netcom.com>
  10. Date: Mon, 4 Jan 1993 20:39:51 GMT
  11. Lines: 19
  12.  
  13. In article <1993Jan3.035343.15539@netcom.com> ersmith@netcom.com (Eric R. Smith) writes:
  14. >Most libraries' malloc() functions will handle everything automatically,
  15. >allocating memory in large chunks (4K or 8K or even 32K) from the OS
  16. >and then splitting those chunks up as necessary. See for example the
  17. >MiNT or GNU C library malloc()/sbrk() code. All the programmer has to
  18. >remember is to use the standard C malloc()/free() functions instead
  19. >of the Atari specific Malloc()/Mfree() functions.
  20. >
  21. >Eric Smith    ersmith@netcom.com    ersmith@atari.uucp
  22. >
  23.  
  24. Do you know of any librarys that will Mfree() blocks once all parts of them
  25. have been free()ed though?  If none do then we have know choice but to use
  26. Malloc() directly in a multi-tasking system or else the user will have to
  27. shut down applications and restart them to free "lost" memory.
  28.   In any case if you are allocating a large block of memory it is better in
  29. every way to use Malloc().
  30.  
  31. - Leo.
  32.