This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
munmap slowness; IsBadReadPtr considered harmful
- From: Brian Ford <ford at vss dot fsi dot com>
- To: cygwin-developers at cygwin dot com
- Date: Fri, 20 Feb 2004 11:54:52 -0600 (CST)
- Subject: munmap slowness; IsBadReadPtr considered harmful
- Reply-to: cygwin-developers at cygwin dot com
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