[patch] fix another module loader memory leak

Arjan van de Ven arjan at infradead.org
Tue Feb 12 12:11:14 PST 2008


On Tue, 12 Feb 2008 11:56:46 -0800 (PST)
"Alan W. Irwin" <irwin at beluga.phys.uvic.ca> wrote:

> Just out of curiosity could you provide more high-level context for
> users concerning these patches?
> 
> For example, do any of these memory-leak fixes correspond to the
> substantial memory leak for X that consumes something like 1 GB of
> memory per week? At least that was the rate of loss of memory that I
> measured looking at the RES column for the "top" application for the
> Xorg process last time I checked for the Debian unstable version of X
> (about a month ago since my X has been up and down quite a bit
> since).  For example, I restarted X recently and top shows RES for
> Xorg at 11MB which is quite reasonable, but if X stays up and that
> past "Big" memory leak has not been fixed, then after a week or so
> that RES amount will be up to a GB even if I completely simplify my
> desktop by killing all browsers, most xterms, etc.
> 
> Presumably, that symptom is a result of a memory leak that is in some
> sort of loop in X that keeps running for a normal desktop and which
> therefore consumes memory at roughly a constant rate.
> 
> I don't have enough knowledge of X to know whether any of your fixes
> correspond to a leak that would occur constantly for normal desktop
> use or whether they correspond to a memory leak that should not occur
> that often and which therefore does not have that much practical
> significance.
> 
> IOW, are these minor memory management irritations you are cleaning
> up (which is always good to see) or are your patches going to have
> large practical consequences for most X users?


These are relatively small leaks (a few dozen Kb); but they, to speak,
the plate for the bigger leak hunting. The problem with leak hunting is that
you really need to fix them all, even the small ones, to get to the bottom
of things.
A simple example is a small 8 byte structure that has a pointer to a 1Mb
data blob; if you leak the pointer to the 8 byte, the leak looks like it's only
8 bytes... but it's actually 1Mb+8 bytes. 
So you have to fix them all to get to the bottom
(it's also a case of seeing 5000 leak messages makes it hard to figure the important ones)

-- 
If you want to reach me at my work email, use arjan at linux.intel.com
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org



More information about the xorg mailing list