Currently untested, but identical to the FreeBSD one so should work... The NetBSD man pages for `madvise` and `mmap` mention the flags that we use.