From owner-freebsd-hackers Mon Jan 12 17:38:01 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA04917 for hackers-outgoing; Mon, 12 Jan 1998 17:38:01 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from word.smith.net.au (vh1.gsoft.com.au [203.38.152.122]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id RAA04496; Mon, 12 Jan 1998 17:34:22 -0800 (PST) (envelope-from mike@word.smith.net.au) Received: from word (localhost [127.0.0.1]) by word.smith.net.au (8.8.8/8.8.5) with ESMTP id LAA04334; Tue, 13 Jan 1998 11:56:33 +1030 (CST) Message-Id: <199801130126.LAA04334@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: Amancio Hasty cc: Stephen Hocking , multimedia@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: FreeBSD Quake page In-reply-to: Your message of "Mon, 12 Jan 1998 10:38:23 -0800." <199801121838.KAA00321@rah.star-gate.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 13 Jan 1998 11:56:31 +1030 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk > > syscall 163 is the linux system call mremap which we have not implemented. > > If anyone knows how to implement mremap please let me know. Heh. I finally managed to get a copy of the Linux kernel source where I can look at it. mremap() is more or less what its name suggests; it allows you to modify an existing mapping. u_long mremap(caddr_t addr, u_long old_len, u_long new_len, u_long flags) There are basically two cases. - Shrink a mapping. (new_len < old_len) You can implement this as munmap(addr + new_len, old_len - new_len). - Grow a mapping, moving disallowed. This requires changing map details. I *think* I can see, in principle, how to do this, but it would have to be done in the vm_mmap module rather than in the linuxulator. John, can you comment on this? As a quick hack, you could try implementing the shrink case, and return ENOMEM for the other cases. This *might* work, depending on the consumer. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\