Skip to content

Use MEM_64K_PAGES on Windows #131709

Description

@MichalPetryka

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions