From owner-freebsd-current Wed Mar 1 9:20:12 2000 Delivered-To: freebsd-current@freebsd.org Received: from plab.ku.dk (plab.ku.dk [130.225.105.65]) by hub.freebsd.org (Postfix) with ESMTP id 1003C37C3E5 for ; Wed, 1 Mar 2000 09:20:07 -0800 (PST) (envelope-from tobez@plab.ku.dk) Received: (from tobez@localhost) by plab.ku.dk (8.9.3/8.9.3) id SAA66844; Wed, 1 Mar 2000 18:20:28 +0100 (CET) (envelope-from tobez) Date: Wed, 1 Mar 2000 18:20:28 +0100 From: Anton Berezin To: Christopher Masto Cc: freebsd-current@FreeBSD.ORG Subject: Re: Shared memory - Was: 2 Queries Message-ID: <20000301182028.C61034@plab.ku.dk> References: <20000229021327.E21720@fw.wintelcom.net> <20000229134143.B4903@netmonger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20000229134143.B4903@netmonger.net>; from chris@netmonger.net on Tue, Feb 29, 2000 at 01:41:43PM -0500 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 The Protein Laboratory, University of Copenhagen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message