Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ada > Size of Vector ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 16 Topic 5774 of 5881
Post > Topic >>

Size of Vector limited to 1024 MB of Heap Size

by Dennis Hoppe <dennis.hoppe@[EMAIL PROTECTED] > Jun 24, 2008 at 10:44 AM

Hi,

my machine has 4 GB of RAM and I am wondering, why I can't use
at least 2 or 3 GBytes to run an Ada program. It seems, that my
Ada Compiler (Gnat 4.4.0) limit the memory to 2 GB per default.
Is it possible to allocate more than 2 GB?

Here is a simple example of an "evil" vector, that gains
more memory in each pass. The program terminates exactly at
1024 MB of used Heap memory.


with Ada.Containers.Vectors;

procedure Heap is
   package Generic_Vector is new Ada.Containers.Vectors
     (Element_Type => Integer, Index_Type => Natural);
		
   Evil_Vector : Generic_Vector.Vector;
begin -- Heap
   loop
     Generic_Vector.Append (Evil_Vector, Integer'Last);
   end loop;
end Heap;


heap(6374) malloc: *** mmap(size=2147487744) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug

raised STORAGE_ERROR : heap exhausted


I could not find a suitable Compiler switch or a parameter, that
can be set for the operating system (linux). "ulimit -v" is already
set to unlimited.

"gnatmem" re****ts, that my water mark with 1024 MB is reached, but
the final water mark is, needless to say, higher.


Best regards,
   Dennis Hoppe
 




 16 Posts in Topic:
Size of Vector limited to 1024 MB of Heap Size
Dennis Hoppe <dennis.h  2008-06-24 10:44:54 
Re: Size of Vector limited to 1024 MB of Heap Size
Adam Beneschan <adam@[  2008-06-24 08:03:41 
Re: Size of Vector limited to 1024 MB of Heap Size
Robert A Duff <bobduff  2008-06-24 13:32:40 
Re: Size of Vector limited to 1024 MB of Heap Size
Peter Schildmann <news  2008-06-24 20:55:31 
Re: Size of Vector limited to 1024 MB of Heap Size
Dennis Hoppe <dennis.h  2008-06-25 17:13:12 
Re: Size of Vector limited to 1024 MB of Heap Size
"(see below)" &  2008-06-25 18:26:31 
Re: Size of Vector limited to 1024 MB of Heap Size
Dennis Hoppe <dennis.h  2008-06-25 23:09:06 
Re: Size of Vector limited to 1024 MB of Heap Size
Gene <gene.ressler@[EM  2008-06-24 13:03:35 
Re: Size of Vector limited to 1024 MB of Heap Size
Robert A Duff <bobduff  2008-06-24 16:38:31 
Re: Size of Vector limited to 1024 MB of Heap Size
anon@[EMAIL PROTECTED] (  2008-06-24 22:53:02 
Extra footnote: Re: Size of Vector limited to 1024 MB of Heap Si
anon@[EMAIL PROTECTED] (  2008-06-24 23:36:11 
Re: Extra footnote: Re: Size of Vector limited to 1024 MB of Hea
tmoran@[EMAIL PROTECTED]   2008-06-24 19:11:54 
Re: Extra footnote: Re: Size of Vector limited to 1024 MB of Hea
anon@[EMAIL PROTECTED] (  2008-06-25 02:49:12 
Re: Extra footnote: Re: Size of Vector limited to 1024 MB of Hea
christoph.grein@[EMAIL PR  2008-06-25 01:04:02 
Re: Size of Vector limited to 1024 MB of Heap Size
Peter Schildmann <news  2008-06-25 12:39:40 
Re: Size of Vector limited to 1024 MB of Heap Size
Dennis Hoppe <dennis.h  2008-06-25 17:29:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 15:31:28 CDT 2008.