🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #39864

Re: Malloc on 2.5 Meg 1040stf - help needed

#39864
From: HC Johnson
Date: Tue, 26 Dec 1989 14:30
23 lines
1265 bytes
In article <1055@dutrun.UUCP>, hans@duttnph.tudelft.nl (Hans Buurman) writes:
> 
> 
> This linker uses gemdos call 0x48 (Malloc) at least twice for
> each file read. It appears that this call can only be issued
> some 300 times, after which it fails, regardless of the amount
> of free memory. 

I had this problem using MWC.  There is a real Malloc() call to get space
for malloc() to distribute.  Since there is a real limit on how many
times you can call Malloc, I found that 
MWC has a variable that changes the size of the chunk each Malloc() asks
for.  I find the free space, divide it by 32, and tell malloc to ask for
that much each time it does a Malloc(). (in MWC the variable is 
_aclicksize).


Howard C. Johnson
ATT Bell Labs
att!lzaz!hcj
hcj@lzaz.att.com

.
Technical Details
Message-ID: <897@lzaz.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!sunybcs!rutgers!att!dptg!lzaz!hcj
References: <1055@dutrun.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!sunybcs!rutgers!att!dptg!lzaz!hcj
From: hcj@lzaz.ATT.COM (HC Johnson)
Newsgroups: comp.sys.atari.st
Subject: Re: Malloc on 2.5 Meg 1040stf - help needed
Summary: in MWC you can change the size of the Malloc behind malloc.
Message-ID: <897@lzaz.ATT.COM>
Date: 26 Dec 89 14:30:39 GMT
References: <1055@dutrun.UUCP>
Organization: AT&T BL Middletown/Lincroft NJ USA
Lines: 23