comp.lang.ada
 help / color / mirror / Atom feed
From: "Nick Roberts" <nick.roberts@acm.org>
Subject: Re: Where are returned values stored?
Date: Thu, 3 Jun 2004 17:13:03 +0100
Date: 2004-06-03T17:13:03+01:00	[thread overview]
Message-ID: <2i910dFk02i0U1@uni-berlin.de> (raw)
In-Reply-To: fP2dnc8B4Y6kNyPdRVn-hA@comcast.com

"Robert I. Eachus" <rieachus@comcast.net> wrote in message
news:fP2dnc8B4Y6kNyPdRVn-hA@comcast.com...

> Warren W. Gay VE3WWG wrote:
> > ...
> > Yes, of course.  You must still however, carve up the
> > address space for the stacks, whether the vm pages are
> > allocated or not.
>
> Actually, no.  There is one of those obvious in hindsight neat
> tricks. Don't allocate the address space for the stack and leave
> the pointer to the stack null/invalid.  When the stack needs to
> be used, both the address space and physical space have to be
> allocated and can then be used.  This helps a lot in Ada, where
> most tasks will never need or use the return stack.

Um, I think this is one of those comments that needs to be taken with a
pinch of salt :-)

Are you (Robert) talking about the main (control, primary) stack? I suspect
most (in fact, all) tasks will use this, even if not much. The IA-32
actually demands the existence of a valid stack (SS:ESP must be valid)
before it will execute anything. I suppose this trick could be used with a
secondary stack. I suppose it could apply to tasks prior to the start of
their execution.

However, it doesn't really detract form the point that, when the stacks
/are/ used, they must be allocated somewhere in your address space.

-- 
Nick Roberts





  parent reply	other threads:[~2004-06-03 16:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-26 19:46 Where are returned values stored? (follow up to yesterday's question) James Alan Farrell
2004-05-26 20:44 ` Simon Wright
2004-05-27  7:51   ` Dmitry A. Kazakov
2004-05-27  9:39 ` Where are returned values stored? Marius Amado Alves
2004-05-27 17:05   ` Warren W. Gay VE3WWG
2004-05-27 20:24     ` James Alan Farrell
2004-05-28 20:33       ` Warren W. Gay VE3WWG
2004-05-29  7:03         ` Martin Krischik
2004-05-29 13:19           ` Larry Kilgallen
2004-05-30  7:10             ` Martin Krischik
2004-06-02  3:14         ` Robert I. Eachus
2004-05-30 21:17     ` Nick Roberts
2004-05-31 12:58       ` Warren W. Gay VE3WWG
2004-06-02  4:07         ` Robert I. Eachus
2004-06-02 12:42           ` Warren W. Gay VE3WWG
2004-06-03  2:00             ` Nick Roberts
2004-06-03  4:34             ` Robert I. Eachus
2004-06-03 16:06               ` Warren W. Gay VE3WWG
2004-06-03 16:13               ` Nick Roberts [this message]
2004-06-07  1:53                 ` Robert I. Eachus
2004-06-07 13:09                   ` Larry Kilgallen
2004-06-09  7:03                     ` Robert I. Eachus
2004-06-05 17:13             ` Simon Wright
2004-05-27 17:11   ` Martin Krischik
2004-05-27 17:07 ` Where are returned values stored? (follow up to yesterday's question) Martin Krischik
replies disabled

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