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!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!novia!transit4.readnews.com!news-out.readnews.com!postnews3.readnews.com!not-for-mail Date: Sun, 29 Aug 2010 18:06:46 -0400 From: "Peter C. Chapin" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2 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> <340c87af-1f15-4590-baa9-ec7e864b7048@l20g2000yqm.googlegroups.com> In-Reply-To: <340c87af-1f15-4590-baa9-ec7e864b7048@l20g2000yqm.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4c7ada3c$0$2372$4d3efbfe@news.sover.net> Organization: SoVerNet (sover.net) NNTP-Posting-Host: 6460474d.news.sover.net X-Trace: DXC=2Rfm7:3Z[<:TkVe4FPDeU7K6_LM2JZB_32h<^iA^CNJ1:WUUlR<856?=DU^ib7>mm<5_o9m90h9=4 X-Complaints-To: abuse@sover.net Xref: g2news1.google.com comp.lang.ada:13833 Date: 2010-08-29T18:06:46-04:00 List-Id: On 2010-08-29 12:16, John Raymond Dore wrote: >> 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; >> >> The rename meant I didn't have to rewrite anything else in the application. >> >> - Brian > > Brilliant elegant solution to my problem Brian. > It works just fine. Be aware that you may now have to explicitly deallocate the array at some point. How necessary that is will depend on your program and some other factors. It's something to keep in mind. Peter