[Mesa-dev] [PATCH] winsys/sw/xlib: Prevent shared memory segment leakage.

Chris Wilson chris at chris-wilson.co.uk
Wed Apr 24 02:34:04 PDT 2013


On Wed, Apr 24, 2013 at 10:23:38AM +0100, jfonseca at vmware.com wrote:
> From: José Fonseca <jfonseca at vmware.com>
> 
> Running piglit with was causing all sort of weird stuff happening to my
> desktop (Chromium webpages become blank, Qt Creator flickered, etc).  I
> tracked this down to shared memory segment leakage when GL is not shutdown
> properly. The segments can be seen running `ipcs` and looking for
> nattch==0.
> 
> This changes fixes this by calling shmctl(IPC_RMID) soon after creation
> (which does not remove the segment immediately, but simply marks it for
> removal when no more processes are attached).

This is only true on Linux. The *BSD perform an immediate release and so
require you to complete the XShmAttach prior to calling IPC_RMID.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the mesa-dev mailing list