process stack handling on XENIX-286

Steve Dyer dyer at spdcc.UUCP
Mon Feb 24 16:09:21 AEST 1986


In article <300 at omen.UUCP>, caf at omen.UUCP (Chuck Forsberg WA7KGX) writes:
> In article <13 at spdcc.UUCP> dyer at spdcc.UUCP (Steve Dyer) writes:
> >I'm still a bit confused about how a process grows (or blows) its
> >stack under XENIX-286...
> 
> Depends on the memory model one uses.  With SMALL and MEDIUM models,
> there is only one data segment.  Since the 286 memory management only
> allows segments to grow in ONE direction, you can grow the heap *or*
> grow the stack, but not both.
> 
Wouldn't it be possible under a small model to allocate TWO data segments
which would ultimately be mapped to the same address ranges, but one would
be for the heap and grow upwards, while the stack segment grew downwards?
If a small model program produced by a compiler never touches the segment
registers and uses only 16 bit addresses, it seems to me that this should
work; I guess the loader and the kernel would have to be changed to support
this.  Are there any holes in this scheme?
-- 
Steve Dyer
dyer at harvard.HARVARD.EDU
{bbncca,bbnccv,harvard}!spdcc!dyer



More information about the Comp.unix.wizards mailing list