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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4dfbb9c23c9a83eb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 09 Aug 2005 23:56:09 -0500 Date: Wed, 10 Aug 2005 00:56:11 -0400 From: Jeff Creem User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Follow up 2: raised STORAGE_ERROR : helper.adb:386 object too large References: <27c5ecc06ac6a213466ab65361d20376@localhost.talkaboutprogramming.com> <4486c49961e0e8ce8904b267fcc860b5@localhost.talkaboutprogramming.com> In-Reply-To: <4486c49961e0e8ce8904b267fcc860b5@localhost.talkaboutprogramming.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.147.74.171 X-Trace: sv3-G89FTZv3bomzFpe65tkzVDZbmx6jZkUA+WNzpkM4vpSxu8JTw6PJ2rwD4TskvfWnJGiWY5Q1cximf9x!XskoELB+3LCWifveDX3h8+w00bMJc1Ws/mx3nKVdO0mjr2W+9CgW099WuD9SjPOMcp/5vXxMqQ== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:4051 Date: 2005-08-10T00:56:11-04:00 List-Id: Adaddict wrote: > Ok, I changed the way of declaring the large variable, and now I'm getting > a different but nicer looking error: raised STORAGE_ERROR : helper.adb:386 > object too large > > The variable is a string (1..n), where n it's the number of bytes that are > going to be read from certain region. The region size can be of some MB, so > I would be easy for me if I could use a variable from this size. How could > I do it? And if I can't do it what alternative would you recomend me? > > Thanks a lot to everyone for your replies and help. > > Regards. > It is hard to tell without looking at the context what the best solution is. If the string is fairly local then an access type can probably be used without worrying too much about creating leak by doing something based on.... type Access_String is access String; procedure Free is new Unchecked_Deallocation(String, Access_String); .. .. .. code that is getting N begin Region_Data := new String(1 .. N); Fill_In_Data_Into_Region_Data Call_Existing_Code_THat_Wants_String(Region_Data.all); Free(Region_Data); exceptioon when others => Free(Region_Data); raise; end;