Date: Thu, 17 Jun 93 18:45:58 EDT From: DJ Delorie 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.