home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.atari.st.tech
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!howland.reston.ans.net!wupost!csus.edu!netcom.com!ersmith
- From: ersmith@netcom.com (Eric R. Smith)
- Subject: Re: Malloc (Was: Sending objc_draw to a buffer)
- Message-ID: <1993Jan8.183133.12773@netcom.com>
- Organization: Netcom Online Communications Services (408-241-9760 login: guest)
- References: <1993Jan4.203951.6091@dcs.warwick.ac.uk> <1993Jan6.224937.10888@netcom.com> <wmtwen.726497985@rw8.urc.tue.nl>
- Date: Fri, 8 Jan 1993 18:31:33 GMT
- Lines: 22
-
- In article <wmtwen.726497985@rw8.urc.tue.nl> wmtwen@urc.tue.nl writes:
- >Well after reading quite of lot of posts on what to use Malloc or
- >malloc en Mfree or mfree I am a bit confused...
-
- The answer is quite simple: use malloc() and free(). This has 3 advantages:
-
- (1) It will work in accessories, if your library is sensible (most are).
- The OS Malloc() function cannot be called from accessories at all.
-
- (2) It will avoid memory wasting under newer versions of the OS (which
- use the MMU and manage memory in pages) and will also avoid some
- bugs in old versions of the OS (TOS 1.0 was limited to 20 Malloc
- calls per process).
-
- (3) It is faster (there is some overhead to entering the OS which can
- often be avoided by the library).
-
- Regards,
- Eric
- --
- ersmith@netcom.com ersmith@atari.uucp
-
-