FYI: NetBSD mmap Improvements
Pedro F. Giffuni
giffunip at yahoo.com
Tue Sep 9 21:58:05 PDT 2003
taken from wine HQ:
http://www.winehq.com/?issue=186#NetBSD mmap Improvements
"On NetBSD (upcoming 1.6.2, and 1.7/2.0-current), there is a new extension flag
MAP_TRYFIXED that essentially simulates current Linux mmap behavior: try the
mmap() hint first, without clobbering mapped pages, even if the hint falls
within traditionally "protected" malloc heap space. If the fixed mapping fails,
the block is still mapped at a relocated address, as if mmap were called with
no flags set.
With this patch, mmapping PE files on NetBSD becomes an order of magnitude
faster, as the vfork()-and-mincore() silly walk is avoided altogether.
I've implemented the patch as forward-looking, allowing other platforms to add
MAP_TRYFIXED to gain the same benefit. (This mmap flag name does not appear to
be used in any divergent fashion on any other platform, per my research when
picking the flag's name.) "
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
More information about the freebsd-hackers