munmap.2 inconsistency ?

Tim Robbins tjr at freebsd.org
Fri Feb 6 14:17:18 PST 2004


On Fri, Feb 06, 2004 at 12:03:23PM -0800, Luigi Rizzo wrote:

> hi,
> browsing through the munmap() page, it says
>      Munmap() will fail if:
> 
>      [EINVAL]           The addr parameter was not page aligned, the len
> 			...
> 
> now, i have verified that munmap works fine with any address returned
> by mmap, even if not aligned, at least on a recent -STABLE.
> 
> As i assume that passing munmap() the same address returned by mmap()
> is common behaviour, should we rephrase the manpage ?

This could have slipped in from POSIX, which requires page-aligned
addresses and lengths to mmap() & friends. I believe SVR4 also
requires this. But yes, the manual pages should be corrected.


Tim


More information about the freebsd-hackers mailing list