Subject: Re: free()
To: John Franklin <>
From: Matthias Buelow <>
List: netbsd-users
Date: 02/19/2001 22:35:11
John Franklin <> writes:

>After using X11 all day (with things like xplanet and xscreensaver running
>occasionally), I notice that my swap usage goes waaaay up.  More than 
>I can account for through top.
>When I kill the X server via ctl-alt-backspace, it frees up a larger chunk
>of swap than top claimed X was using.  Is this a side effect of the 
>malloc() optimization, or is this indicitive of a larger bug?

this would indicate that some X programs which you're running until
you exit your X session (by shutting down the server, in your case)
would use resources in the X server and not give them up again, either
intentionally or simply because of leaks in those programs;
the X server itself also could have leaks but I haven't experienced any
so far with the XF86_SVGA or XF86_S3 i386 servers as shipped with NetBSD
1.5, so probably your desktop programs (window manager, any button bars,
other always-running tools etc.) are a bit leaky?  This is not so uncommon
and unless you're running fvwm or twm etc. which are rather debugged in
that area you might encounter such things (kde and gnome desktops and
programs like enlightenment seem to be prime candidates, especially
development snapshots of these.)
I run xscreensaver aswell and it doesn't look like it's leaking (much),
own or server memory...