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]

Re: munmap slowness; IsBadReadPtr considered harmful


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


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