From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 29 Aug 2000 18:58:39 +0200 From: Lucio De Re To: 9fans@cse.psu.edu Subject: Re: [9fans] Stack initialisation Message-ID: <20000829185838.N678@cackle.proxima.alt.za> References: <200008291645.MAA28515@cse.psu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <200008291645.MAA28515@cse.psu.edu>; from rob pike on Tue, Aug 29, 2000 at 12:45:20PM -0400 Topicbox-Message-UUID: 0015047e-eac9-11e9-9e20-41e7f4b1d025 On Tue, Aug 29, 2000 at 12:45:20PM -0400, rob pike wrote: > > Are you referring to the local stack? Each true process (proc) has a > private stack, so it's possible to do things like place a pointer in high > memory that points to memory unique to that process, a storage class > that's hard to get in fully shared memory. > The exact details I don't understand (for i386 - from /sys/src/alef/lib/386/run.h): enum { Ptab = 0xbfff5000, /* Private stack */ Execstk = 0xbf001000, /* Exec stack linkage area */ }; what I would like explained is how these are allocated, or more appropriately, where does the process get granted permission to use what seem like two arbitrary areas of memory? Please keep in mind that I am not up to date with "recent" OS and architecture developments and memory allocation and virtual memory are still black magic to me. Finding the details by searching through the kernel sources would be very tedious and probably I'd miss the wood for the trees. In this particular instance, it may suffice for me to find out whether in 3rd edition Plan 9 these values are different and what they are, but actually knowing how they are established would make me a lot happier. Of course, if they are arbitrary, then I'll never find out why reusing code containing the above fails when assigning to an entity in that area :-( Thanks for any assistance. ++L