Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Sep 2003 21:58:03 -0700 (PDT)
From:      "Pedro F. Giffuni" <giffunip@yahoo.com>
To:        freebsd-hackers@FreeBSD.org
Subject:   FYI: NetBSD mmap Improvements
Message-ID:  <20030910045803.1892.qmail@web13404.mail.yahoo.com>

next in thread | raw e-mail | index | archive | help
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
http://sitebuilder.yahoo.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030910045803.1892.qmail>