comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam@spam.com>
Subject: Re: Memory Leak
Date: Tue, 03 Jan 2006 18:06:23 GMT
Date: 2006-01-03T18:06:23+00:00	[thread overview]
Message-ID: <z2zuf.2828$Hl6.1517@newsread3.news.pas.earthlink.net> (raw)
In-Reply-To: <1136304945.663764.14490@g14g2000cwa.googlegroups.com>

markp wrote:
> We are experiencing a memory leak in out GNAT Ada program that we
> cannot explain. We've narrowed it down to our generic queue package as
> the culprit. However, all the memory in the package is allocated at
> instantiation. I've attached the source code and if anybody can see
> something, it would be greatly appreciated! The data types passed in
> during the instantiation are variant records. Lastly, does GNAT provide
> any queuing sevices?

This is a curious monster; it can't decide if it wants to be an ADT or an ASM, 
and queues with negative depths seem to be meaningful. However, there is nothing 
about it that would seem likely to cause a memory leak. It might have something 
to do with where and how it is instantiated, or perhaps the types used to 
instantiate it.

GNAT has GNAT.Bounded_Buffers, or you could use something from one of the many 
fine libraries of Ada components available, like 
PragmARC.Queue_Bounded_Blocking. They have more coherent designs and a better 
grasp of the issues involved in Ada concurrency.

-- 
Jeff Carter
"Nobody expects the Spanish Inquisition!"
Monty Python's Flying Circus
22



  reply	other threads:[~2006-01-03 18:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-03 16:15 Memory Leak markp
2006-01-03 18:06 ` Jeffrey R. Carter [this message]
2006-01-03 18:57   ` markp
2006-01-03 19:03     ` Martin Dowie
2006-01-03 19:05     ` markp
2006-01-04  4:46       ` Jeffrey R. Carter
2006-01-05 21:12       ` Ludovic Brenta
replies disabled

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