Date: Mon, 13 Jan 2003 17:54:24 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Peter Wemm <peter@wemm.org> Cc: "Alan L. Cox" <alc@imimic.com>, arch@FreeBSD.ORG Subject: Re: Virtual memory question Message-ID: <200301140154.h0E1sOe6015613@apollo.backplane.com> References: <20030114002831.1C8C12A89E@canning.wemm.org>
next in thread | previous in thread | raw e-mail | index | archive | help
:> >
:> > getmemfd().
:> >
:>
:> Roughly speaking, this is shm_open(3), which we currently implement
:> using files.
:
:.. which is expressly what I wanted to avoid.
:
:Cheers,
:-Peter
I can work up basic operation (i.e. getmemfd() and mmap()) in an hour
or two. I'll have a patch set tonight. It looks utterly trivial.
I think I'll generalize the system call, though, with two parameters:
getsysfd(int type, off_t size)
fd = getsysfd(SYSFD_MEMORY, 1024*1024); /* get 1MB memory object */
fd = getsysfd(SYSFD_MEMORY, -1); /* get infinite-sized memory object */
mmap(...)
This way we can use it to implement and obtain other special purpose
descriptors. For example, like the controlling terminal, or a timer,
or a kqueue, etc etc etc. Since we seeem to be implementing special
purpose FDs more and more these days.
-Matt
Matthew Dillon
<dillon@backplane.com>
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?200301140154.h0E1sOe6015613>
