Description
It seems that Windows 10 VirtualAlloc2 provides a new flag, MEM_64K_PAGES that's a hint that lets it page memory more efficiently.
The only requirement it seems is that the allocation size and base must be 64kB aligned.
AFAIR dotnet already aligns the sizes to 64kB due to that being the allocation granularity on Windows so it seems to me that this could be used by GC and VM if the API is available?
cc @jkotas if you see any issue here
Configuration
Windows
Regression?
n/a
Data
https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualalloc2
Description
It seems that Windows 10 VirtualAlloc2 provides a new flag,
MEM_64K_PAGESthat's a hint that lets it page memory more efficiently.The only requirement it seems is that the allocation size and base must be 64kB aligned.
AFAIR dotnet already aligns the sizes to 64kB due to that being the allocation granularity on Windows so it seems to me that this could be used by GC and VM if the API is available?
cc @jkotas if you see any issue here
Configuration
Windows
Regression?
n/a
Data
https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualalloc2