Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site spdcc.UUCP Path: utzoo!linus!decvax!genrad!panda!talcott!harvard!spdcc!dyer From: dyer@spdcc.UUCP (Steve Dyer) Newsgroups: net.micro.pc,net.unix-wizards Subject: Re: process stack handling on XENIX-286 Message-ID: <16@spdcc.UUCP> Date: Mon, 24-Feb-86 01:09:21 EST Article-I.D.: spdcc.16 Posted: Mon Feb 24 01:09:21 1986 Date-Received: Wed, 26-Feb-86 05:49:20 EST References: <13@spdcc.UUCP> <300@omen.UUCP> Organization: S.P. Dyer Computer Consulting, Cambridge MA Lines: 21 Xref: linus net.micro.pc:6914 net.unix-wizards:14107 In article <300@omen.UUCP>, caf@omen.UUCP (Chuck Forsberg WA7KGX) writes: > In article <13@spdcc.UUCP> dyer@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@harvard.HARVARD.EDU {bbncca,bbnccv,harvard}!spdcc!dyer