Article View: comp.sys.atari.st
Article #30982Re: Three questions.
From: Sid Van den Heede
Date: Wed, 02 Mar 1988 20:22
Date: Wed, 02 Mar 1988 20:22
21 lines
1460 bytes
1460 bytes
In article <1988Feb22.221218.13780@jarvis.csri.toronto.edu> juancho@dgp.toronto.edu (John Buchanan) writes: > > 3) How reliable are the malloc() and free() functions >provided with MWC. I have had no problems with the MWC routines themselves. But I have run out of memory (according to malloc()) while there was still plenty of memory left (prox 1/4Mb according to malloc(-1) or Malloc(-1)...it's been a while and I don't have my documentation here). This is due to the problem with the memory allocation scheme in TOS. When malloc() is called, it calls Malloc to get a chunk of memory, from which it doles out the amount you requested. Subsequent malloc() calls give you more of the memory left from the previous Malloc or calls Malloc again as appropriate. After a small number of Malloc calls (20, 40?) you don't get any more. -- Sid Van den Heede Voice: 416-792-1137 sid@brambo.UUCP FAX: 416-792-1536 ...!utgpu!telly!brambo!sid Bramalea Software, Suite 406, 44 Peel Centre Dr, Brampton, Ontario L6T 4B5
Technical Details
Message-ID:
<304@brambo.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!lsuc!ncrcan!brambo!sidReferences:
<1988Feb22.221218.13780@jarvis.csri.toronto.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!lsuc!ncrcan!brambo!sid From: sid@brambo.UUCP (Sid Van den Heede) Newsgroups: comp.sys.atari.st Subject: Re: Three questions. Keywords: MWC system() malloc() free() Message-ID: <304@brambo.UUCP> Date: 2 Mar 88 20:22:36 GMT References: <1988Feb22.221218.13780@jarvis.csri.toronto.edu> Reply-To: sid@brambo.UUCP (Sid Van den Heede) Organization: Bramalea Software Inc., Bramalea, Ont. Lines: 21