comp.lang.ada
 help / color / mirror / Atom feed
From: "Dr. Adrian Wrigley" <amtw@linuxchip.demon.co.uk.uk.uk>
Subject: Problem with memory leaks in Glade and GLADE
Date: Wed, 17 Sep 2003 01:22:20 +0100
Date: 2003-09-17T01:22:20+01:00	[thread overview]
Message-ID: <2PN9b.1478$I9.42@newsfep4-winn.server.ntli.net> (raw)

Hi all!

I have got my client/server system running nicely now, based around
Annex E (GLADE 3.15p, RedHat Linux 7.3, Intel etc.), and around
GtkAda and GTK 2.2.  But there are two serious memory problems.

The GUI client (designed with Glade) consumes monotonically increasing memory.

Every second, I make a Set_Text call to display the current time:
Set_Text (UpdateRecord.Window.Time_Label, Image (Time.Functions.Now));

I make no attempt to free any associated memory.  Reading the documantation
on GtkAda, I am led to believe that the reference counting will ensure
this works OK.  The program consumes about 16kB *per second*, and
brought my server to a state of near collapse after less than a day :(
What am I doing wrong? (without the Set_Texts, memory usage is constant)

The Annex E server also consumes constantly rising memory.

In this case, each time a client partition connects and terminates,
the server partition grabs roughly another 200kB of memory.
My server code only allocates with "new" in one place, and
calls "Unchecked_Deallocation" shortly after.
I am puzzled by this, and suspect that the PCS may be leaking.
Any suggestions for tracing and solving this problem?

Overall, the combination of AnnexE and GtkAda is very nice for building
distributed, real-time, GUI-based applications.  But I do feel
rather "out on a limb" with these tools compared with acquantances
trying to do similar with (eg) Java.  Annex E seems to attract the interest
of a tiny minority of Ada uses, themselves a tiny minority of programmers.
I fear that Annex E use risks being below the critical mass needed to
get the interest of tool developers, language designers (Ada 0Y) etc.
To lose it would be a great shame and a lost opportunity :(

Your thoughts?
--
Dr Adrian Wrigley, Cambridge, UK.




             reply	other threads:[~2003-09-17  0:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-17  0:22 Dr. Adrian Wrigley [this message]
2003-09-17 14:14 ` Problem with memory leaks in Glade and GLADE Stephen Leake
2003-09-22 12:16 ` Robert I. Eachus
2003-09-22 22:30 ` Dr. Adrian Wrigley
2003-09-23 13:14   ` Stephen Leake
2003-09-23 23:53     ` Dr. Adrian Wrigley
2003-09-24  1:21       ` Jeff C,
2003-10-03 17:27   ` Dr. Adrian Wrigley
replies disabled

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