munmap slowness; IsBadReadPtr considered harmful
Fri Feb 20 17:54:00 GMT 2004
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?
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
More information about the Cygwin-developers