www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/28/13:41:25

Date: Sat, 28 Mar 1998 10:40:06 -0800 (PST)
Message-Id: <199803281840.KAA16527@adit.ap.net>
Mime-Version: 1.0
To: fritzp AT performancesw DOT com, "djgpp AT delorie DOT com" <djgpp AT delorie DOT com>
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Help

At 05:52  3/27/1998 -0700, Fritz Parsons wrote:
>DJ,
>   We're running CWSDPMI on a small system with 2M total and notice 
>allocation of 0x60000 on startup before stack allocation. Can we 
>minimize the initial request, since it does not seem to show up as
>available memory for malloc/calloc? We need all available memory to be
>managed by application via calloc/sbrk mechanisms. Suggestions on how 
>and how much to limit initial memory allocation greatly appreciated.

As far as I know, the main memory allocation done before stack allocation is
that for the COFF image to be loaded into. That is rounded up to a multiple
of 64K; I assume there is a reason for that, though you could investigate
further. Other than that, there's only a tiny allocation for the stubinfo
block, and then the stack of course, which I assume you know how to control.

The only other way you can make the initial request smaller, other than
possibly eliminating the 64K roundup, is to shrink your code/data. :)


Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019