Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 2000 18:20:28 +0100
From:      Anton Berezin <tobez@plab.ku.dk>
To:        Christopher Masto <chris@netmonger.net>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: Shared memory - Was: 2 Queries
Message-ID:  <20000301182028.C61034@plab.ku.dk>
In-Reply-To: <20000229134143.B4903@netmonger.net>; from chris@netmonger.net on Tue, Feb 29, 2000 at 01:41:43PM -0500
References:  <20000229021327.E21720@fw.wintelcom.net> <Pine.BSF.4.21.0002290954410.917-100000@merlin.onsea.com> <20000229134143.B4903@netmonger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 29, 2000 at 01:41:43PM -0500, Christopher Masto wrote:

> Personally, I have this extreme distaste for sysv shared memory.  It
> is a very scarce resource that is not freed automatically, and seems
> to go completely against the unix model.  Reminds me of having to free
> memory on the Amiga, and slowly running out of chip RAM.

> In any case, one major offender is imlib.  Since I've recently gone
> Gnome, I've had to turn off imlib's "MIT-SHM shared memory" option or
> things would go bad after a few minutes or hours of use.

I would say that the programs you've mentioned are badly written then.

It takes no more than

        XSync(disp,False);
        shmctl( shmid, IPC_RMID, 0);

right after a call to XShmAttach() for a shared memory image to achieve
the automatic reclamation of the memory.  Shared pixmaps are different,
but not that many programs should use these anyway.

Cheers,
-- 
Anton Berezin <tobez@plab.ku.dk>
The Protein Laboratory, University of Copenhagen


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000301182028.C61034>