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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,419864ed91cc937d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!exabot.com!freenix!feeder.news.orange.fr!not-for-mail Date: Sun, 29 Aug 2010 19:57:03 +0200 From: Pascal Obry Organization: Home - http://www.obry.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr-FR; rv:1.8.1.22) Gecko/20090605 Thunderbird/2.0.0.22 Mnenhy/0.7.5.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: heap size exceeded for large matrices References: <14007b1b-c290-4c73-a0ec-d3c5195b83d4@t20g2000yqa.googlegroups.com> <4c7a360b$0$10227$ba4acef3@reader.news.orange.fr> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4c7a9f6f$0$5423$ba4acef3@reader.news.orange.fr> NNTP-Posting-Date: 29 Aug 2010 19:57:03 CEST NNTP-Posting-Host: 82.124.196.199 X-Trace: 1283104623 reader.news.orange.fr 5423 82.124.196.199:3284 X-Complaints-To: abuse@orange.fr Xref: g2news1.google.com comp.lang.ada:13822 Date: 2010-08-29T19:57:03+02:00 List-Id: Brian, > I have had trouble with this in the past - the documented linker options > apparently didn't work (around the 2008 timeframe - may not still be true) and > Pragma Storage_Size only worked for new tasks, not the main program.. Right, that's why you need to tell the linker about the proper stack size you need. > I resorted to dynamic allocation on the heap, and renaming to hide the pointer > dereference. So, given > my_array_type is array (positive range <>, positive range <>) of float; > > I replaced > > my_array: my_array_type (1..10000, 1..10000); > > with > > my_array_ptr : access my_array_type := new my_array_type (1..10000, 1..10000); > my_array : my_array_type renames my_array_ptr.all; Ok, fine, that's indeed a workaround to this problem. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net - http://v2p.fr.eu.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B