Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* starting stack address of processes running on OSF/1 V1.3 111 alpha
@ 1994-11-09  2:51 Jeremy Casas
  0 siblings, 0 replies; only message in thread
From: Jeremy Casas @ 1994-11-09  2:51 UTC (permalink / 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1994-11-09  2:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-11-09  2:51 starting stack address of processes running on OSF/1 V1.3 111 alpha Jeremy Casas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox