Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 (Tek) 9/28/84 based on 9/17/84; site iddic.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!whuxlm!harpo!decvax!tektronix!orca!iddic!kendalla From: kendalla@iddic.UUCP (Kendall Auel) Newsgroups: net.arch Subject: Re: 286 stack overflow Message-ID: <2172@iddic.UUCP> Date: Mon, 9-Sep-85 18:08:06 EDT Article-I.D.: iddic.2172 Posted: Mon Sep 9 18:08:06 1985 Date-Received: Thu, 12-Sep-85 11:18:53 EDT References: <8780@microsoft.UUCP> Reply-To: kendalla@iddic.UUCP (Kendall Auel) Organization: Tektronix, Beaverton OR Lines: 28 Summary: Gordon Letwin writes: > [about the 80286 memory protection feature] > > ... but you can't expand the stack segment when it > overflows. Bottom line, the good news is that you can tell the stack > overflowed, the bad news is that you must now abort the program. To handle the stack overflow condition, you can simply create another stack segment. Since Intel allows segments to overlap, it would be a good idea to have the new segment include the first 2 or 3K words of the original stack. This allows for addressing parameters which may have been passed on the stack. When the stack "underflows", the original stack segment can be brought back in. I suppose you can call this "virtual stack management". Question: What happens if the memory directly preceding the original stack is already in use? (Hint: what happens if you try, for example, to expand a 32K segment into a 64K segment?) Kendall Auel Tektronix, Inc. Graphics Workstations Division (usual disclaimer)