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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,fe0d58e5e40e10c7 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!atl-c05.usenetserver.com!news.usenetserver.com!cycny01.gnilink.net!cyclone1.gnilink.net!spamkiller2.gnilink.net!gnilink.net!trndny09.POSTED!0f19ed38!not-for-mail From: "Frank J. Lhota" Reply-To: NOSPAM.lhota@adarose.com User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: many exceptions cause memory leak? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Fri, 21 Oct 2005 15:38:06 GMT NNTP-Posting-Host: 141.154.56.84 X-Complaints-To: abuse@verizon.net X-Trace: trndny09 1129909086 141.154.56.84 (Fri, 21 Oct 2005 11:38:06 EDT) NNTP-Posting-Date: Fri, 21 Oct 2005 11:38:06 EDT Xref: g2news1.google.com comp.lang.ada:5855 Date: 2005-10-21T15:38:06+00:00 List-Id: Christopher Broeg wrote: > Hi, > > I am running some numeric code in ADA95 using GNAT Academic edition. > When negative values occur or the integration routine fails exceptions > are raised and propagated. This works fine. > > Surprisingly, the memory usage increases from an initial ~40MB to 100MB > and more during one day of execution. the memory usage shouldn't > increase in my eyes. Is it possible that raising many exceptions > coninues to use up some memory? > > thanks for your ideas, > > Chris Which platform is this running on? That could be helpful in determining the cause of your problem. On Windows XP, I wrote a GNAT GPL application that raised and handled a million exception occurrences. This application also does a call to the Win32 API function GlobalMemoryStatus both before and after handling a million exception occurrences. The memory status before and after handling these exceptions was virtually the same. This seems to indicate that on XP at least, GNAT exceptions do *not* leak memory. -- "All things extant in this world, Gods of Heaven, gods of Earth, Let everything be as it should be; Thus shall it be!" - Magical chant from "Magical Shopping Arcade Abenobashi" "Drizzle, Drazzle, Drozzle, Drome, Time for the this one to come home!" - Mr. Lizard from "Tutor Turtle"