What new system calls do you want in BSD?
Guy Harris
guy at auspex.auspex.com
Fri Feb 2 06:27:51 AEST 1990
>>> vm_offset_t *addr; /* Where to map to (page aligned) */
>>Yes, and so do SunOS 4.x and System V Release 4. What's more, both of
>>them implement "mmap", which bears a startling resemblance to "map_fd".
>
>For a user-mode function, I strongly dislike the page-alignment constraint.
>Does mmap have a similar requirement?
Yes. The SunOS 4.x/S5R4 VM subsystem implements "mmap()" as an
interface to the VM system's mechanism for setting up mappings between
pages in your address space and objects such as files; given that said
VM mechanism can't, for example, say "bytes 23 through 47 of this
particular page are backed by bytes from thus-and-such a vnode", it
requires that the address be page-aligned. (I.e., if you really mean
"map", there's a *lot* of work involved in lifting the page-alignment
restriction.)
However, "mmap()" lets you ask the system to assign an address, which is
almost always what you want, so applications don't need to worry about
page alignment. (If they need to get a page-aligned address, they can
use "getpagesize()" and work from there.)
More information about the Comp.unix.wizards
mailing list