ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/vm_alloc.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/vm_alloc.cpp (file contents):
Revision 1.19 by gbeauche, 2005-06-06T19:40:17Z vs.
Revision 1.20 by gbeauche, 2005-06-20T03:54:46Z

# Line 456 | Line 456 | int vm_protect(void * addr, size_t size,
456  
457   int vm_get_page_size(void)
458   {
459 < #ifdef _WIN32
460 <    return 4096;
459 > #ifdef HAVE_WIN32_VM
460 >        static unsigned long page_size = 0;
461 >        if (page_size == 0) {
462 >                SYSTEM_INFO si;
463 >                GetSystemInfo(&si);
464 >                page_size = si.dwAllocationGranularity;
465 >        }
466 >        return page_size;
467   #else
468 <    return getpagesize();
468 >        return getpagesize();
469   #endif
470   }
471  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines