Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
X-Org and memory usage when programs get sigsegv or sigkill?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
spikeles
n00b
n00b


Joined: 31 Mar 2005
Posts: 11

PostPosted: Tue Jan 31, 2006 1:26 am    Post subject: X-Org and memory usage when programs get sigsegv or sigkill? Reply with quote

First off, yes i do know this has been done to death.. However, i have a slightly different approach.

I KNOW for a fact X-org is leaking memory.

Here is some output from psmap displaying the memory map of my X server( i set it up in a loop). I've removed the duplicate stuff since this is the only bit that changed.
Code:
Tue Jan 31 11:12:14 EST 2006
4426:   /usr/X11R6/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
081f6000  25232K rwx--    [ anon ]
 total   307136K
Tue Jan 31 11:12:24 EST 2006
4426:   /usr/X11R6/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
081f6000  26332K rwx--    [ anon ]
 total   308236K
Tue Jan 31 11:12:34 EST 2006
4426:   /usr/X11R6/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
081f6000  27432K rwx--    [ anon ]
 total   309336K
Tue Jan 31 11:12:44 EST 2006
4426:   /usr/X11R6/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
081f6000  27732K rwx--    [ anon ]
 total   309636K
Tue Jan 31 11:12:54 EST 2006
4426:   /usr/X11R6/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
081f6000  28832K rwx--    [ anon ]
 total   310736K
Tue Jan 31 11:13:04 EST 2006
4426:   /usr/X11R6/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
081f6000  29132K rwx--    [ anon ]
 total   311036K


As you can see, the memory used by the program was NOT freed.
My question therefore to anyone who knows the insides of the xserver, is why isn't this memory freed and is there a way to free this memory without having to restart the xserver?

This was achieved by starting a 3D program(an OpenGL game i'm developing actually) and then terminating it with kill -9. I thought that memory was supposed to be cleaned up when programs crashed? If not, is there any plans to develop some type of contingency in xwindows to support cleaning up memory of crashed processes?

If i let this continue X will end up using all my memory and since i have a 1gig i've had the xserver up to 900meg vm usage alone(not including physical memory)

ps i'm using these:
Linux me! 2.6.13-ck2 #5 Tue Jan 24 21:03:38 EST 2006 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/Linux
xorg-x11: 6.8.2-r6
_________________
I don't check my programs for bugs, i have an error correcting modem...
Back to top
View user's profile Send private message
spikeles
n00b
n00b


Joined: 31 Mar 2005
Posts: 11

PostPosted: Wed Feb 01, 2006 4:13 am    Post subject: Reply with quote

Ok. i found this last night in the nvidia readme ( hmm. perhaps i should have mentioned i was using Nvidia drivers?)
Quote:

Q. OpenGL applications leak significant amounts of memory on my system!

A. If your kernel is making use of the -rmap VM, the system may be leaking
memory due to a memory management optimization introduced in -rmap14a. The
-rmap VM has been adopted by several popular distributions, the memory leak
is known to be present in some of the distribution kernels; it has been
fixed in -rmap15e.

If you suspect that your system is affected, please try upgrading your
kernel or contact your distribution's vendor for assistance.


So.. does my current kernel ( 2.6.15-gentoo-r1) have this problem?
_________________
I don't check my programs for bugs, i have an error correcting modem...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum