munmap slowness; IsBadReadPtr considered harmful

Brian Ford ford@vss.fsi.com
Tue Feb 24 23:50:00 GMT 2004


On Tue, 24 Feb 2004, Brian Ford wrote:

>   for (end = (char *)addr + len, addr = (void *)((DWORD)addr % getpagesize());
>
Doh!  Scratch that.  Obvious bug.

Something more like:
       addr = (void *)((DWORD)addr & getpagesize () - 1);

I'll repost the final version when I actually have this tested well.
Sorry!

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



More information about the Cygwin-developers mailing list