Use MEM_64K_PAGES on Windows
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
### 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
Contributor guide
Research direction
Start with the VirtualAlloc2 documentation linked in the issue, then locate the Windows-specific GC and VM allocation paths that could use the flag. Confirm the existing 64 kB alignment assumptions and API availability; done means the hint is applied safely where supported without changing behavior elsewhere.
Written by the indexing model from the issue text.
Assessment
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100