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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8727a81126dc209a,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-16 17:22:23 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.stueberl.de!newspeer1-gui.server.ntli.net!ntli.net!newsfep4-winn.server.ntli.net.POSTED!53ab2750!not-for-mail From: "Dr. Adrian Wrigley" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Problem with memory leaks in Glade and GLADE Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <2PN9b.1478$I9.42@newsfep4-winn.server.ntli.net> Date: Wed, 17 Sep 2003 01:22:20 +0100 NNTP-Posting-Host: 81.100.88.147 X-Complaints-To: abuse@ntlworld.com X-Trace: newsfep4-winn.server.ntli.net 1063758142 81.100.88.147 (Wed, 17 Sep 2003 01:22:22 BST) NNTP-Posting-Date: Wed, 17 Sep 2003 01:22:22 BST Organization: ntl Cablemodem News Service Xref: archiver1.google.com comp.lang.ada:42588 Date: 2003-09-17T01:22:20+01:00 List-Id: 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.