comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert Klungle" <bklungle@adelphia.net>
Subject: Re: many exceptions cause memory leak?
Date: Fri, 21 Oct 2005 10:59:36 -0700
Date: 2005-10-21T10:59:36-07:00	[thread overview]
Message-ID: <MtadnRtyA9JGscTeRVn-rg@adelphia.com> (raw)
In-Reply-To: yX76f.7$dW6.4@trndny09

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" <NOSPAM.lhota@adarose.com> 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"





  reply	other threads:[~2005-10-21 17:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-21 10:07 many exceptions cause memory leak? Christopher Broeg
2005-10-21 15:38 ` Frank J. Lhota
2005-10-21 17:59   ` Robert Klungle [this message]
2005-10-21 18:13     ` Ed Falis
2005-10-24 11:29 ` Christopher Broeg
2005-10-24 20:00   ` Simon Wright
2005-10-25  7:32     ` Christopher Broeg
2005-10-25  7:42       ` Christopher Broeg
2005-10-25 12:34         ` Alex R. Mosteo
2005-10-25 12:55           ` Alex R. Mosteo
2005-10-25 18:50         ` Wiljan Derks
2005-10-26 10:56           ` Christopher Broeg
2005-10-25 13:09       ` Frank J. Lhota
2005-10-25 14:09         ` Christopher Broeg
2005-10-24 21:27   ` Andreas Schulz
2005-10-26 12:45 ` Christopher Broeg
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox