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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3c61ad7f887cbc37 X-Google-Attributes: gid103376,public From: guerby@gnat.com (Laurent Guerby) Subject: Re: GNAT memory allocation Date: 1996/08/01 Message-ID: #1/1 X-Deja-AN: 171517785 sender: guerby@schonberg.cs.nyu.edu references: <32013E73.33F8@isrc.sandia.gov> organization: New York University reply-to: guerby@gnat.com newsgroups: comp.lang.ada Date: 1996-08-01T00:00:00+00:00 List-Id: 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 , Team Ada. "Use the Source, Luke. The Source will be with you, always (GPL)."