memory leak?

Glynn Clements glynn at
Mon Feb 9 02:37:12 PST 2009

DM wrote:

> Today I clicked in firefox 3.0.6 (fedora 10 / gnome / yum-updated / amd64 / 2GiB main memory / no swap) on
> this URL:
> Download took quite long and the box' responsiveness was not as good
> as usual... So I clicked the close-window box in the title of the
> firefox window. The firefox window disappeared and the process, too. 
> But the box had just 10% free main memory now (usually 80% r free
> after a fresh login); Xorg used 1.8GiB according to ps.
> So I installed xrestop, which told me that about 2 pixmaps (20MiB)
> belong to an "unknown" process.

1. xrestop (and X generally) doesn't deal with processes, but clients. 
Is it possible that a client spawned a child process which inherited
the X connection and still exists? The X server won't free resources
until the corresponding connection is closed, which only happens when
*no* process has a descriptor for the remote end of the connection.

2. 20MiB isn't significant; it's ~1% of your main memory. What is
significant is that the X server needed to enlarge its heap, and is
now keeping hold of that memory in case it needs it in the future. 

This wouldn't normally be a problem, as it will just get swapped out
if it isn't being used. Except that you say that you don't have any

> Normally it takes a day until the Xorg process (VSZ RSS: 431952 88772
> --> 474472 123508) and other processes get too large. Then I log off
> and in and everything is OK again.
> How can I avoid that logoff/login procedure?

Add swap. Then, any memory which is allocated to the X server but
isn't actively being used will get swapped out, allowing the physical
memory to be used for something else.

Glynn Clements <glynn at>

More information about the xorg mailing list