On Thu, 31 Jan 2008, Brian Cameron wrote:
>
>> Bugster 6641518 Firefox leaks memory to Xserver
>> Closed as not a bug, but maybe we should reopen as an RFE.  The fact
>> that  firefox can grow to over 1G is bad enough, but when it causes the
>> XSun process to also grow over 1G, the only way to fix it is for the
>> user(s) to log out and restart the bloated X server.  The only way the
>> user knows this happens is that the Sun Ray server becomes memory starved.

This problem is not specific to Firefox.  Perhaps a better long term 
approach is to address how memory is allocated in the X server.  If 
traditional malloc heap memory is used (brk()/sbrk()), then it is 
difficult to recover the memory.  If the memory is via anonymous 
mapping then memory can be entirely reclaimed once it is no longer 
referenced.  If the X11 server can detect that the client no longer 
needs the memory, then it can be returned to the OS.  It seems likely 
that a statistical garbage collector can be implemented to return 
memory to the OS when VM is running low.

Use of SYSV shared memory to pass images to the server is nice from an 
update efficiency standpoint but may be poor from a VM standpoint 
since it seems likely that SYSV shared memory pages can't be paged out 
(can they?).  Disabling use of shared memory may help even if it 
causes duplication of memory buffers (in client and server).  This 
only effects use by local clients.

Bob
======================================
Bob Friesenhahn
bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


Reply via email to