While coding in C# I found this strange looking function
https://docs.microsoft.com/en-us/dotnet ... empagesize
It returns the page size in bytes from paging mechanism.
Ive printed its value and it shows me 4096-Byte.
Does it mean this value can be different among 4-KByte Page 2-MByte Page and 1-GByte Page ?
It's strange that user level can get a such kernel related information.
[SOLVED] Strange Windows API function
[SOLVED] Strange Windows API function
Last edited by Rukog on Thu Sep 09, 2021 12:47 pm, edited 1 time in total.
-
- Member
- Posts: 5512
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Strange Windows API function
Windows NT was originally written to run on several different non-x86 platforms, and some of them did not support 4kiB pages.
Userspace needs to know the page size because memory management operates at page granularity.
Userspace needs to know the page size because memory management operates at page granularity.