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.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d9241cc896c5fa1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-01 04:35:10 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: Michal Nowak Newsgroups: comp.lang.ada Subject: Re: To_Unbounded_String and PROGRAM_ERROR Date: Fri, 01 Feb 2002 13:34:44 +0100 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7BIT X-Trace: avanie.enst.fr 1012566902 13532 137.194.161.2 (1 Feb 2002 12:35:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Fri, 1 Feb 2002 12:35:02 +0000 (UTC) Return-Path: In-reply-to: X-Mailer: Calypso Version 3.20.01.01 (3) Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk X-Reply-To: vinnie@inetia.pl List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:19462 Date: 2002-02-01T13:34:44+01:00 On 02-02-01 at 12:06 Michal Nowikowski wrote: >Hello > >I've this code: > >--- >Path : array(1..1500) of Unbounded_String; >... >for I in 1..1500 loop > Path(I) := To_Unbounded_String(Get_Current_Dir & Some_String); >end loop; >--- > >and get sth like that >raised PROGRAM_ERROR : a-strunb.ads:368 > >This occure after few iterations - it depends of length of converted >string. It looks for me that the limmit of memory is exceeded. >Have You any idea how to cope with it? You may handle an exception. But I suppose this is not the kind of answer you want. You may also try to estimate the maximum lenght of string you want to store and do something like this: Path : array(1..1500) of String (1 .. Max_Length); If you are really low on memory, this won't run also. But, if this work, maybe not the lack of memory is the problem. Maybe there is something in Get_Current_Dir function? Hope this gave some help, Mike: ----------------------------------------- ____| \%/ |~~\ O | o>> Mike Nowak | T | / > vinnie@inetia.pl | http://www.geocities.com/vinnie14pl _|__