mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-09-07 16:54:28 +00:00
Get real page size on Windows for vm_get_page_size() [64 KB]
This commit is contained in:
parent
d0fd88f7b2
commit
3a0b4ed999
@ -456,8 +456,14 @@ int vm_protect(void * addr, size_t size, int prot)
|
|||||||
|
|
||||||
int vm_get_page_size(void)
|
int vm_get_page_size(void)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef HAVE_WIN32_VM
|
||||||
return 4096;
|
static unsigned long page_size = 0;
|
||||||
|
if (page_size == 0) {
|
||||||
|
SYSTEM_INFO si;
|
||||||
|
GetSystemInfo(&si);
|
||||||
|
page_size = si.dwAllocationGranularity;
|
||||||
|
}
|
||||||
|
return page_size;
|
||||||
#else
|
#else
|
||||||
return getpagesize();
|
return getpagesize();
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user