From owner-freebsd-arch Mon Jan 13 20:26: 2 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 045A537B401 for ; Mon, 13 Jan 2003 20:26:01 -0800 (PST) Received: from eumenes.hosting.swbell.net (eumenes.hosting.swbell.net [216.100.98.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 33E1143ED8 for ; Mon, 13 Jan 2003 20:26:00 -0800 (PST) (envelope-from alc@imimic.com) Received: from imimic.com (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) by eumenes.hosting.swbell.net id XAA02435; Mon, 13 Jan 2003 23:25:52 -0500 (EST) [ConcentricHost SMTP Relay 1.14] Message-ID: <3E239150.9FC363DD@imimic.com> Date: Mon, 13 Jan 2003 22:25:52 -0600 From: "Alan L. Cox" Organization: iMimic Networking, Inc. X-Mailer: Mozilla 4.8 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: Peter Wemm Cc: Matthew Dillon , arch@FreeBSD.ORG Subject: Re: Virtual memory question References: <20030114041407.DDFC32A89E@canning.wemm.org> Content-Type: text/plain; charset=x-user-defined Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Peter Wemm wrote: > ... > Sorry about the ambiguity. No problem. :-) > My problem with the shm_*() calls is that the API is pretty heavily tied to > the file system. If there is a way to avoid that, then fine. It looks > like one needs to ftruncate() it to resize a shm_open() object. From the spec (on the web page that I mentioned): "The name argument points to a string naming a shared memory object. It is unspecified whether the name appears in the file system and is visible to other functions that take pathnames as arguments." I don't think ftruncate() is necessary. The underlying shm object can be grown implicitly according to its mmap()ings. I do not, however, know of a way to shrink an shm object. Alan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message