Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site arizona.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!arizona!whm From: whm@arizona.UUCP (Bill Mitchell) Newsgroups: net.unix-wizards Subject: stack space mapping question Message-ID: <21131@arizona.UUCP> Date: Sat, 2-Feb-85 04:45:32 EST Article-I.D.: arizona.21131 Posted: Sat Feb 2 04:45:32 1985 Date-Received: Sun, 3-Feb-85 11:33:55 EST Distribution: net Organization: Dept of CS, U of Arizona, Tucson Lines: 22 I have a question about how the Unix kernel manages stack space. Suppose one has a process that grabs a couple of hundred kbytes of stack space for use in a subroutine. Obviously, while this space lies between the stack pointer and the end of the stack, the pages in the region are part of the address space of the process. My question is: If the process returns from the subroutine, are those stack pages used by the subroutine still in the process's address space? It would seem like a reasonable thing for the system to not consider the pages to be in the process's address space, i.e., consider the stack page into which the sp points to be the lowest stack page in the process's address space. (Note that a down-growing stack is assumed for purposes of discussion.) On 4.2 on Suns and Vaxs, the system does allow (based on empirical studies rather than code examination) access to pages below the sp as long as they were properly contained in the stack at some point in time. Is this implementation dependent or is this some sort of standard Unix "feature"? Thanks in advance, Bill Mitchell whm.arizona@csnet-relay {ihnp4,noao,mcnc,utah-cs}!arizona!whm