munmap slowness; IsBadReadPtr considered harmful
Wed Feb 25 00:04:00 GMT 2004
On Tue, 24 Feb 2004, Brian Ford wrote:
> 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.
It's too late in the day and my brain is turned off. I'm an idiot, I
addr = (void *)((DWORD)addr & ~(getpagesize () - 1));
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
More information about the Cygwin-developers