mmap bug?

Joseph Koshy joseph.koshy at gmail.com
Sun Jul 31 18:15:21 GMT 2005


gk> That's something I didn't test.  No, the 'extra' data 
gk> disappears.

So the 'extra' data isn't reaching the FS and is probably
being served up from a cached VM data the second time your
test program ran.

This is still a bug though: the mmap(2) manual page
says:
    ...
    If len is not a multiple of
    the page-size, the mapped region may extend past the 
    specified range.  Any such extension beyond the end of the 
    mapped object will be zero-filled.
    ...

We are clearly not doing the zero-filling.

-- 
FreeBSD Volunteer,     http://people.freebsd.org/~jkoshy


More information about the freebsd-current mailing list