Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jan 1998 11:56:31 +1030
From:      Mike Smith <mike@smith.net.au>
To:        Amancio Hasty <hasty@rah.star-gate.com>
Cc:        Stephen Hocking <shocking@mailbox.uq.edu.au>, multimedia@freebsd.org, hackers@freebsd.org
Subject:   Re: FreeBSD Quake page 
Message-ID:  <199801130126.LAA04334@word.smith.net.au>
In-Reply-To: Your message of "Mon, 12 Jan 1998 10:38:23 -0800." <199801121838.KAA00321@rah.star-gate.com> 

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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801130126.LAA04334>