🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by < Gary H > Fri, 19 Feb 1993 22:42
Memory Leak in Xt (Translation Tables)
#62
Author: < Gary H >
Date: Fri, 19 Feb 1993 22:42
42 lines
2223 bytes

There seems to be a memory leak in the X11R4 version of Xt.  When translations
are augmented with the widget's existing ones, the creation and subsequent
destruction of that widget reveals a memory leak of 4.3k.  It seems the
translation table isn't freed correctly when the widget is destroyed.

Here is a trace of where the memory is being allocated, but not freed.

4800360 = malloc( 1800 ); called from :
	00560220 T XtMalloc
	00671060 T _XtInitializeStateTable
	00673784 T _XtCvtMergeTranslations
	00565856 T _XtCallConverter
	00674312 t ConvertATranslation
	00676308 T XtAugmentTranslations

There are about 100 of these from XtAugmentTranslations (not always 1800
bytes, but sometimes 8, 36, 160, etc).  The widget being augmented is an
XmList, but the problem will show up with an XmLabel widget as well (and
I do not think it's limited to just these widgets).

The problem may not be with Augmenting the translation, but with freeing
the translation table or problem with merging the tables.  Merging should
alloc memory, but it's not being freed.

There is a work around to this problem which involves putting all translations
in a resource file.  

Has anyone else discovered this problem? If so, there there a fix for this?
I'm in the process of tracking this down, but I would like some feedback on
this matter.

I have tried MITs unoffical #19 fix, and that does not fix the problem.

Thanks in advance,
Gary
-- 
//////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
                                garyh@sco.com 
                       Santa Cruz, California 95061
//////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads