Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jan 2003 22:25:52 -0600
From:      "Alan L. Cox" <alc@imimic.com>
To:        Peter Wemm <peter@wemm.org>
Cc:        Matthew Dillon <dillon@apollo.backplane.com>, arch@FreeBSD.ORG
Subject:   Re: Virtual memory question
Message-ID:  <3E239150.9FC363DD@imimic.com>
References:  <20030114041407.DDFC32A89E@canning.wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E239150.9FC363DD>