From: ada_95@my-deja.com
Subject: Re: Memory allocation
Date: 2000/03/01
Date: 2000-03-01T00:00:00+00:00 [thread overview]
Message-ID: <89k4v6$b84$1@nnrp1.deja.com> (raw)
In-Reply-To: 38BCD2B8.503B95FA@gmx.net
In article <38BCD2B8.503B95FA@gmx.net>,
Andreas <Amun_Ra72@gmx.net> wrote:
> Hi!
>
> How can I find out in Ada95 with GNAT how much
memory a program may
> allocate (i.e. how much memory is currently
free)?
> Does anyone have an idea?
> (It's not System.Memory_Size, that's for sure
:-))
>
> Could you please send replies via e-mail, too.
>
> Thanks in advance
>
> Andreas
> Amun_Ra72@gmx.net
>
>
It is very easy to find how much memory needed
(allocate/deallocate) for a particular access
object. This holds true for any compiler. Here is
an example.
declare
type Integer_Access is access Integer;
Int_Acc : Integer_Access;
begin
Int_Acc := new Integer' (911);
Put_Line ("Size is: " &
Integer'Image (Int_Acc.all'Size));
-- ...
end;
Sent via Deja.com http://www.deja.com/
Before you buy.
next prev parent reply other threads:[~2000-03-01 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-01 0:00 Memory allocation Andreas
2000-03-01 0:00 ` ada_95 [this message]
2000-03-02 0:00 ` Oliver Kellogg
2000-03-05 0:00 ` Nick Roberts
2000-03-06 0:00 ` Larry Kilgallen
2000-03-02 0:00 ` ada_95
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox