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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,405c9fed403b342b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-31 07:52:50 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.mathworks.com!wn13feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 31 Dec 2003 09:52:49 -0600 Date: Wed, 31 Dec 2003 10:52:48 -0500 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Program Terminates ... References: <1b585154.0312211634.6c414d2e@posting.google.com> <1b585154.0312300730.459483cc@posting.google.com> <1b585154.0312301431.6816874d@posting.google.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.34.214.193 X-Trace: sv3-FxIqAHfR6DkEsobew4qJcbxx1JsCzkfKNSyzY6qr9kfCpw86cS3lA7Nm5O24eAGyvzF7OWdKHVaK5Uv!ygY+Gm4t0WVto3t7bipbeW16SjY7oFMkpU/nFAxUpuNjSLPI/HPTGnpajt9WjQ== 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.1 Xref: archiver1.google.com comp.lang.ada:3993 Date: 2003-12-31T10:52:48-05:00 List-Id: Jeff C, wrote: >>Hey. Could it be that the Unbounded_String's are not the problem per se, >>but the fact that they are within record objects being dynamically >>allocated is the problem? Or one of the problems? > Well, if these record are either not controlled types or are never > explicitly free'd then yes this could be the problem. Definitely true. If you allocate an object on the heap, then don't free it, any Unbounded_Strings within the object won't be deallocated unless you leave the scope of the object type. (In the normal case of the type being declared in a library package or the main program, read never.) The other potential problem is that your Unbounded_String use could be fragmenting the heap. Unfortunately the way to fix/test this is to allocate everything else from some non-default heap. If you have only a few such types it should be easy enough to give each its own heap with a specified size, but if you have lots of dynamically allocated types using non-default heaps can get old fast. Incidently, it sounds like Bounded_String is probably the right solution for your problem. If it is possible to put a reasonable limit on the size of the strings nested inside other dynamic types, this should solve your problem--and result in faster code. -- Robert I. Eachus "The war on terror is a different kind of war, waged capture by capture, cell by cell, and victory by victory. Our security is assured by our perseverance and by our sure belief in the success of liberty." -- George W. Bush