Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!mips!apple!rutgers!att!cbnewsh!dwc From: dwc@cbnewsh.ATT.COM (Malaclypse the Elder) Newsgroups: comp.unix.wizards Subject: Re: What new system calls do you want in BSD? Message-ID: <7879@cbnewsh.ATT.COM> Date: 2 Feb 90 18:23:59 GMT References: <12157@stealth.acf.nyu.edu> <12067@smoke.BRL.MIL> Organization: The Legion of Dynamic Discord Lines: 21 In article <12067@smoke.BRL.MIL>, gwyn@smoke.BRL.MIL (Doug Gwyn) writes: > In article <2863@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: > >> 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 mmap has a similar requirement. this is because the page is the unit of mapping that the hardware supports. the alternative is some HUGE overhead of faulting on any reference to a page that has an address that is not page aligned and doing any copying necessary to update that page. i'm not sure, but doesn't mmap return the address that something was actually attached to? the *addr above is just a hint to the system about where to attach? so user level code doesn't have to know? danny chen att!hocus!dwc