From: guerby@gnat.com (Laurent Guerby)
Subject: Re: GNAT memory allocation
Date: 1996/08/01
Date: 1996-08-01T00:00:00+00:00 [thread overview]
Message-ID: <ws991byczp4.fsf@schonberg.cs.nyu.edu> (raw)
In-Reply-To: 32013E73.33F8@isrc.sandia.gov
Henry> I've got a problem allocating memory using the GNAT Ada
Henry> compiler v3.05 on a Sun Sparc 10 w/ Solaris 2.4. When I
Henry> declare large arrays (on the order of 1 Meg) I get a core dump.
Henry> It seems like the memory for these large arrays is allocated
Henry> from the stack.
Since GNAT on Solaris doesn't implement yet stack checking, this
may indeed be a stack overflow. May be you're declaring a big array in
a task or in a subprogram that is called from a task, then the
solution is to use the pragma Storage_Size, RM95-13.3(61-67) to
specify a bigger stack for the task. If you think this is a compiler
bug, send your set of sources andGNAT version information to
report@gnat.com.
Henry> Is there a way force storage of these arrays
Henry> elsewhere in memory where there is more storage space -- maybe
Henry> something equivalent to the "static" statement in c? Are there
Henry> any pragmas that do this?
A "static" C maps to a package defined variable, and there's also
dynamic allocation to allocate arrays on the heap (using new).
Henry> Any help would be greatly appreciated!
Hope this helps,
--
Laurent Guerby <guerby@gnat.com>, Team Ada.
"Use the Source, Luke. The Source will be with you, always (GPL)."
next prev parent reply other threads:[~1996-08-01 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-08-01 0:00 GNAT memory allocation Henry W. Schneiderman
1996-08-01 0:00 ` Laurent Guerby [this message]
1996-08-02 0:00 ` Tucker Taft
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox