🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.linux.x
Article #174

XCheckMaskEvent() causes memory leak ?

#174
From: Tristan
Date: Fri, 17 Jan 1997 00:00
34 lines
2377 bytes
I have been looking more closely, and it seems that XCheckMaskEvent()
allocates 104 bytes when a new event needs to be read from the
X-Server connection file descriptor.

It seems that from time to time the Queue of X events gets in
a screwy state, in which each call to XCheckMaskEvent(display, -1, &ev)
malloc's 104 bytes while returning False (I give the mask -1 to
get any event).  So it creates a memory leak...

I have not spent time debugging Xlib.

:-( :-(

Has anyone ever had this problem with Linux or Solaris ?

It it very easy to see it: let an interactive X
program run a looong time, and see the memory that it uses
gets larger and larger (slowly), or use debug_malloc, and see
thousands of lines like:


2649: *** alloc: at 'ra=0x400339e7' for 104 bytes, got '0x8315680|s1'
2650: *** alloc: at 'ra=0x400339e7' for 104 bytes, got '0x8315700|s1'
2651: *** alloc: at 'ra=0x400339e7' for 104 bytes, got '0x8315780|s1'
2652: *** alloc: at 'ra=0x400339e7' for 104 bytes, got '0x8315800|s1'
2653: *** alloc: at 'ra=0x400339e7' for 104 bytes, got '0x8315880|s1'
2654: *** alloc: at 'ra=0x400339e7' for 104 bytes, got '0x8315900|s1'


Regards, -- Tristan Savatier (mailto:tristan@mpegtv.com)
           
MpegTV website:   http://www.mpegtv.com
MPEG.ORG website: http://www.mpeg.org
Technical Details
Message-ID: <32E07C92.651D529F@creative.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103734,a386631e0f50256
X-Google-Attributes: gid103734,public
X-Google-Thread: 1667f1,a386631e0f50256
X-Google-Attributes: gid1667f1,public
X-Google-Thread: 157100,a386631e0f50256
X-Google-Attributes: gid157100,public
X-Google-Thread: 10d8a4,a386631e0f50256
X-Google-Attributes: gid10d8a4,public
X-Google-Thread: 15dded,a386631e0f50256
X-Google-Attributes: gid15dded,public
X-Google-Thread: f9a37,a386631e0f50256
X-Google-Attributes: gidf9a37,public
X-Google-Thread: f4bda,a386631e0f50256
X-Google-Attributes: gidf4bda,public
From: Tristan <tristan@creative.net>
Subject: XCheckMaskEvent() causes memory leak ?
Date: 1997/01/17
Message-ID: <32E07C92.651D529F@creative.net>
X-Deja-AN: 210599005
content-type: text/plain; charset=us-ascii
organization: Posted via CAIS Internet <info@cais.com>
mime-version: 1.0
newsgroups: comp.os.linux.x,comp.windows.x,fj.windows.x,,fr.comp.windows.x11,no.x,,relcom.x,,uiuc.cs.windows.x
x-mailer: Mozilla 3.01 (X11; I; Linux 2.0.0 i586)