www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/06/17/19:11:31

Date: Thu, 17 Jun 93 18:45:58 EDT
From: DJ Delorie <dj AT ctron DOT com>
To: darrylo AT hpnmxx DOT sr DOT hp DOT com
Cc: grw AT tamu DOT edu, djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: gccdpmi1.zip on omnigate

>      Although the DPMI stack isn't dynamically resizeable, I thought
> that you could control (shrink) the static stack size via _stklen, with
> a minimum of 256KB.  If this is true, then you could use less than 4MB
> by shrinking the stack.

_stklen is the *minimum* stack size.  Since the size of .text can grow
really close to the beginning of .data, the stack placed in the gap
could be as small as zero bytes.  If crt0 determines that the gap
between _etext and .data is less than _stklen, it allocates _stklen
bytes from the heap and moves the stack there.  However, it refuses to
allocate less than 256K when moving the stack to the heap, and will
automatically allocate heap space if the gap is less than 256K.

If the gap is already bigger than _stklen, the stack is not moved.

- Raw text -


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