This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

munmap slowness; IsBadReadPtr considered harmful


Using strace, I traced a severe performance problem with one of our apps
to munmap.  That call was taking an extrodinarily long time to complete,
especially if the file to be unmapped was on a network drive.

By adding more strace log messages, I narrowed the problem down to the
IsBadReadPtr check for a vaild address range.  Further more, using
Sysinternals filemon, I found that IsBadReadPtr appears to be faulting in
every non-resident page in the range.  That obviously explains the slow
down, especially for files on network drives.

So, the question is, does anyone have any idea how to perform the validity
check without faulting in the entire address range we're about to dump?

Thanks.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]