Make PageAllocator use next_mmap_addr_hint
on Windows
#17377
Labels
contributor friendly
This issue is limited in scope and/or knowledge of Zig internals.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
os-windows
standard library
This issue involves writing Zig code for the standard library.
Milestone
This is a TODO in the code currently:
zig/lib/std/heap.zig
Lines 31 to 32 in 412d863
On non-Windows systems,
PageAllocator
uses this to make the addresses returned always increase to avoid memory addresses being re-used. This is useful/necessary for theGeneralPurposeAllocator
to behave as documented:zig/lib/std/heap/general_purpose_allocator.zig
Lines 18 to 20 in 412d863
I'm converting this into an issue to better track progress towards addressing this on Windows.
Right now,
VirtualAlloc
is used inPageAllocator
, but if the functionVirtualAlloc2
was used instead (on >= Windows 10), it would allow the use ofnext_mmap_addr_hint
viaLowestStartingAddress
@dweiller has tried to make a binding for
VirtualAlloc2
for unrelated reasons but ran into some problems. Relevant Discord links:My response:
The text was updated successfully, but these errors were encountered: