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,fe0d58e5e40e10c7 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.adelphia.com!news.adelphia.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 21 Oct 2005 13:00:59 -0500 From: "Robert Klungle" Newsgroups: comp.lang.ada References: Subject: Re: many exceptions cause memory leak? Date: Fri, 21 Oct 2005 10:59:36 -0700 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1506 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Message-ID: NNTP-Posting-Host: 68.68.62.75 X-Trace: sv3-Cja2wk3emaKrcH5LyDl9sb6hSWaeKASqzyooPp0Eyt4LXJVoqe870djQovIzDECRXeUf+LJKlAfc7/F!lL94vT3rqdCSa4tlqNLB8lfKxXDqNjog8n6n4NycWbFViClFw8rfEdET+133rBZsVseSQCTq5cDo!iqGSvCyutmIkHA== X-Complaints-To: abuse@adelphia.net X-DMCA-Complaints-To: copyright@adelphia.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:5860 Date: 2005-10-21T10:59:36-07:00 List-Id: For what it is worth, a few years ago my team developed a large system which ran on SGIs, IBM AIXs, and Intel systems. We found that over time, the memory usage by the system grew even though all memory was being returned. We found out that the Ada Run Time requested more memory from the OS even though it had memory available in its allocation pool. Eventually, this pool allocation stopped growing and occasionally dropped a little (we expect due to the action of other programs running). The Ada allocation pool grew to 4.6 GB before stabilizing. The system ran for weeks without crashing (due to memory exhaustion). We were told by the compiler vendor this was done to improve the dynamic memory allocation performance. Take it for what it is worth. Just an observation. cheers...bob "Frank J. Lhota" wrote in message news:yX76f.7$dW6.4@trndny09... > 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"