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