gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cario and shmget problems


From: Riccardo Mottola
Subject: Re: cario and shmget problems
Date: Sat, 10 Jul 2010 19:55:04 +0200
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100418 SeaMonkey/2.0.4

Hi,
The error that Riccardo got is complaining that shmget() can't allocate memory, 
which sounds more like a resource leak.  This actually has nothing to do with 
X11 - the error message is generated in response to a system call failing, not 
in response to an X11 event.  The most likely cause of this is that we are 
allocating a lot of shared memory segments and leaking them.  Shared memory is 
generally a more scarce resource than local memory.  On FreeBSD, for example, 
the default only allows 128 shared memory objects per process and 8192 pages of 
shared memory.  If we're leaking shared memory, it's very easy to go over this 
limit.

In fact, the use of shared memory with the Cairo back end is currently 
completely wrong - it may work, but it's a design that will give absolutely the 
worst possible performance possible from Cairo, because we're implicitly 
telling Cairo not to use hardware acceleration for drawing and then telling the 
X server to perform a redundant copy if it wants to do hardware acceleration.  
This is something that Opal will fix by not trying to make Cairo look like 
libart, so I'm not sure if it's worth bothering chasing a short-term fix.
It may be a possible explanation. The error does not occour always. I stat an app like Ink and everythign is perfect, no errors reported. If I work with PRICE (which can load very big images) or sometimes GWorkspace (which might have many windows with many images, icons, previews etc) I can start getting those errors and the performance clearly gets worse and the warning then persist. If in PRICE I close the image and load a small one I continue getting that warning.

Riccardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]