comp.lang.ada
 help / color / mirror / Atom feed
From: kilgallen@eisner.decus.org (Larry Kilgallen)
Subject: Re: pointers , space requirements
Date: 1996/12/19
Date: 1996-12-19T00:00:00+00:00	[thread overview]
Message-ID: <1996Dec19.170524.1@eisner> (raw)
In-Reply-To: 59c832$4gg@corn.cso.niu.edu


In article <59c832$4gg@corn.cso.niu.edu>, system@niuhep.physics.niu.edu writes:

> 	I am mapping out the memory requirements for a programming
> project that makes use of lots of pointers (excuse me, of access 
> variables :).  And I haven't a clue as to how much space a pointer
> takes up.  
> 	Will this vary by hardware?  This program will be compiled
> and run (hopefully) both on a Pentium under OS/2 and on an Alpha
> under Digital Unix (and possibly under VMS).
> 	So could y'all give me a ballpark figure for the memory
> allocation of a pointer?

This depends not only on the operating system but also the compiler.
DEC Unix requires 64 bit addresses, whereas DEC Ada on VMS uses only
32 bits (regardless of whether it is VAX or Alpha).  Someone from
ACT can comment on whether their forthcoming GNAT release for VMS
will support 64 bit addresses or just 32 bits.

It is possible, of course, for an "access variable", to take a lot
more memory by including extra trace information, but I am not aware
of any compilers that create access variables in that fashion.

But DEC Unix and VMS are both virtual memory operating systems,
so to some level of approximation more memory is "free".  In such
situations planning out your access patterns and resultant paging
behaviour (which is fairly independent of programming language)
is more important.

There are pathological situations where the size of access variables
might dominate the problem, but in most cases there is more "data"
(stuff gotten via the access variables) than there is space devoted
to access variables.  If you have access variables pointing to arrays
of access variables pointing to more arrays of access variables, all
of which end up pointing to just two static strings:

	"Yes"
    and
	"No!"

then indeed the size of access variables may dominate your problem,
but in most cases it does not.

Larry Kilgallen




  reply	other threads:[~1996-12-19  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-19  0:00 pointers , space requirements system
1996-12-19  0:00 ` Larry Kilgallen [this message]
1996-12-20  0:00 ` Robert Dewar
replies disabled

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