From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1f0b49e8848e371d X-Google-Attributes: gid103376,public From: ada_95@my-deja.com Subject: Re: Memory allocation Date: 2000/03/01 Message-ID: <89k4v6$b84$1@nnrp1.deja.com>#1/1 X-Deja-AN: 591946010 References: <38BCD2B8.503B95FA@gmx.net> X-Http-Proxy: 1.1 netcache (NetCache 4.0R4D3), 1.0 x29.deja.com:80 (Squid/1.1.22) for client 10.3.31.159, 207.109.1.73 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Mar 01 20:37:22 2000 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 95) Date: 2000-03-01T00:00:00+00:00 List-Id: In article <38BCD2B8.503B95FA@gmx.net>, Andreas 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.