Mail Archives: djgpp/1998/03/28/13:41:25
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 -