From owner-freebsd-arch Mon Jan 13 17:54:26 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 1C9BA37B401 for ; Mon, 13 Jan 2003 17:54:25 -0800 (PST) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFF3243F13 for ; Mon, 13 Jan 2003 17:54:24 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.6/8.12.6) with ESMTP id h0E1sO0i015614; Mon, 13 Jan 2003 17:54:24 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.6/8.12.6/Submit) id h0E1sOe6015613; Mon, 13 Jan 2003 17:54:24 -0800 (PST) Date: Mon, 13 Jan 2003 17:54:24 -0800 (PST) From: Matthew Dillon Message-Id: <200301140154.h0E1sOe6015613@apollo.backplane.com> To: Peter Wemm Cc: "Alan L. Cox" , arch@FreeBSD.ORG Subject: Re: Virtual memory question References: <20030114002831.1C8C12A89E@canning.wemm.org> 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 :> > :> > 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message