Mail Archives: djgpp-workers/2003/02/10/22:40:07
> Doing it this way also means that the system can attempt to
> increase the available stack space if it wishes.
We can't increase stack space as we are currently laid out.
We have a single block of memory. DPMI 0.9 does not provide
full address space control.
> I don't know just how DJGPP allocates initial (virtual) memory,
> but I assume it is a chunk for code, followed by a chunk for
> globals, followed by a variable sized chuck for sbrk, and then a
> chunk for stack.
Code, Data, Zeroed-Data, Stack (fixed size), sbrk
An alternate way I never coded was:
Stack (starts at 0xffffffff down), Code, Data, BSS, sbrk
It depends on address wrap and no selector limits
If you run out of stack, you expand the block, copy all the contents
up the amount you expand the stack, the adjust the base address of
the selectors to match.
Since NT,Win2K,XP don't do the address wrap thing, sort of useless
Would have been cool for other systems ...
- Raw text -