From: casas@orange.cse.ogi.edu (Jeremy Casas)
Subject: starting stack address of processes running on OSF/1 V1.3 111 alpha
Date: 9 Nov 1994 02:51:43 GMT [thread overview]
Message-ID: <39pdfv$jn0@reuter.cse.ogi.edu> (raw)
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
reply other threads:[~1994-11-09 2:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox