Reputation: 877
On linux this can be found by running
getconf PAGESIZE
How can this parameter be found on Windows? Is it even a parameter, or just a constant?
Upvotes: 1
Views: 775
Reputation: 11649
Windows-based operating systems Win32-based operating systems, such as those in the Windows 9x and Windows NT families, may use the system function GetSystemInfo() from kernel32.dll.
#include <stdio.h>
#include <windows.h>
int main(void)
{
SYSTEM_INFO si;
GetSystemInfo(&si);
printf("The page size for this system is %u bytes.\n", si.dwPageSize);
return 0;
}
I couldn't find any direct command that you can run to find it out.
Upvotes: 1