OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Mar 18, 2024 10:24 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: [SOLVED] Strange Windows API function
PostPosted: Thu Sep 09, 2021 10:50 am 
Offline
Member
Member

Joined: Sun Aug 01, 2021 5:24 pm
Posts: 51
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.


Last edited by Rukog on Thu Sep 09, 2021 12:47 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Strange Windows API function
PostPosted: Thu Sep 09, 2021 12:24 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5069
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group