🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #8135

Major memory leak in asciiTextWidget (X11R4)

#8135
From: Roger Smith RCS
Date: Tue, 15 Sep 1992 23:36
55 lines
2723 bytes
We have a very large and complex program that was initially
developed under X11R3 and then extensively modified under
early X11R4.  We are now trying again to add some upgrades, and
extend the program so it will run under both X11R4 & X11R5. Unfortunately,
some of the changes we put in for X11R5 leak like hell when run
under X11R4.
 
One of the changes made was to replace all of the asciiStringWidgetClass
args to XtCreateWidget with asciiTextWidgetClass, and then modify the
associated args and code accordingly.

A copy of a purify report follows. I'm hoping that
someone out there will recognize the symptoms because the program
is much too big to post.
 
The question(s)that I have for you xperts is this:

1. is AsciiTextWidgetClass a lost cause in this regard? or-
2. Are we missing patches to X11R4 that addressed this problem
   ( we had to blow away the X11R4 sources long ago because
   of disk space problems. )    - or
3. Am I in error in using XtSetValues to change the text in the 
   viewable portion of an AsciiText Widget?


_____________________________________________
(dbx) p purify_newleaks()

Purify: Searching for new memory leaks since last newleaks() call...
Found 191 leaks.
There are 195584 leaked bytes, which is 35% of the 565256 bytes in the heap.

       1024 bytes (191 times).     Last memory leak at 0x103178
195584 total bytes lost (mlk), malloc called from:
             XtMalloc (<shared library>; pc = 0xf74b0350)
             XawAsciiSourceChanged (<shared library>; pc = 0xf75a3c00)
             etext (<shared library>; pc = 0xf75a2d00)
             XtSetSensitive (<shared library>; pc = 0xf74e52b4)
             XtSetValues (<shared library>; pc = 0xf74e5804)

Above is all that purify reports. No matter how many times this
report is generated it looks the same except for the number of total
bytes lost and the number of times.

------------------------------------------------------------------
Roger Smith
Sterling Software at
NASA-Ames Research Center
rsmith@proteus.arc.nasa.gov
- 
If change is -- inevitable -- predictable -- beneficial -- 
doesn't logic demand that you be a part of it?
One man cannot summon the future. But one man can change the present!
    -- Kirk and the Alternate Spock, "Mirror, Mirror," stardate unknown
+
Technical Details
Message-ID: <1992Sep15.233637.4834@riacs.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!riacs!pioneer.arc.nasa.gov!rsmith

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.x
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!riacs!pioneer.arc.nasa.gov!rsmith
From: rsmith@pioneer.arc.nasa.gov (Roger Smith RCS)
Subject: Major memory leak in asciiTextWidget (X11R4)
Message-ID: <1992Sep15.233637.4834@riacs.edu>
Sender: news@riacs.edu
Organization: Sterling Software @NASA-Ames Research Center
Date: Tue, 15 Sep 92 23:36:37 GMT
Lines: 55