From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,a8fe08bc70b4034e,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-11-08 19:06:07 PST Path: nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!math.ohio-state.edu!uwm.edu!reuter.cse.ogi.edu!orange.cse.ogi.edu!casas From: casas@orange.cse.ogi.edu (Jeremy Casas) Newsgroups: comp.sys.dec Subject: starting stack address of processes running on OSF/1 V1.3 111 alpha Date: 9 Nov 1994 02:51:43 GMT Organization: Oregon Grad. Inst. Computer Science and Eng., Portland Distribution: world Message-ID: <39pdfv$jn0@reuter.cse.ogi.edu> NNTP-Posting-Host: orange.cse.ogi.edu I was wondering if there is a general way of getting the starting address of the user stack. On other systems, this address is defined in the macro USRSTACK. For example, on the Sun4s (SunOS 4.x), it's defined as #define USRSTACK 0xF0000000 On the system I'm using (from uname - OSF1 bart V1.3 111 alpha), this definition exists but is defined as follows: #define USRSTACK ((vm_offset_t)u.u_stack_end) where u presumably is of type struct user. My question(s), 1. Does this mean that the starting address of the stack can only be determined at run-time (unlike in SunOS)? I mean, is there another way of determining this starting address value other than USRSTACK? 2. Assuming it can only be determined at run-time (which is fine for my needs), does this mean that only processes that have access to /vmunix and /dev/kmem can know this? I'm assuming here that the process has to explicitly read /dev/kmem to get it's uarea (where u_stack_end is defined). 3. This is just a side question, was this done this way because they expect the starting stack address to be different for different processes? If not, why did they define it as variable (even for a specific version of the kernel)? Anyway, are these assumptions correct? If not, then is there another way to get the starting stack address? Any suggestion would be appreciated. BTW, e-mail reply preferred. Thanks in advance! jeremy -- Jeremy Casas OGI: casas@cse.ogi.edu (503) 690-1125 Research Associate URL: http://www.cse.ogi.edu/~casas/ Oregon Graduate Institute of Science & Technology