Posted: Wed Mar 20, 2013 11:06 pm Post subject: Splitting page into multiple sub pages?
Say I have a large page of allocated memory:
0x00401000 - 0x01000000
And it has the protection PAGE_EXECUTE_READWRITE but I want to only make part of the page PAGE_EXECUTE_READWRITE and part of the page PAGE_EXECUTE_READONLY
The range of pages you are speaking of (0x00401000 - 0x01000000) is not a single page, but a range of pages having identical protection attributes.
The size of a single page in bytes is constant, and this size information can be retrieved using GetSystemInfo.
You can change the protection of a region of consecutive pages using VirtualProtect.
The range of pages you are speaking of (0x00401000 - 0x01000000) is not a single page, but a range of pages having identical protection attributes.
The size of a single page in bytes is constant, and this size information can be retrieved using GetSystemInfo.
You can change the protection of a region of consecutive pages using VirtualProtect.
Ahhh I see what you mean. Each page is only 0x1000 bytes long. The reason I thought it was one page was because I viewed the pages in cheatengine and cheatengine said it was a continuous page of that many bytes. But if I call virtualprotect on a region it doesn't affect the rest.
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 vote in polls in this forum You cannot attach files in this forum You can download files in this forum