MCPcopy Create free account
hub / github.com/WinDurango/WinDurango / EraVirtualFree

Function EraVirtualFree

projects/WinDurango.KernelX/src/kernelx.cpp:394–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392
393 if (dwFreeType == MEM_RELEASE || (dwFreeType == MEM_DECOMMIT && !dwSize))
394 dwSize = Mappable.RegionSize - ((ULONG_PTR)BasePage - (ULONG_PTR)AllocationBase);
395
396 ULONG_PTR LastPage = ((ULONG_PTR)lpAddress + dwSize) & ~(PageSize - 1);
397
398 for (ULONG_PTR BaseAddress = BasePage; BaseAddress <= LastPage; BaseAddress += PageSize)
399 UnmapViewOfFile2(hProcess, (PVOID)BaseAddress, MEM_PRESERVE_PLACEHOLDER);
400

Callers 1

XMemFreeDefaultFunction · 0.85

Calls 1

EraVirtualFreeExFunction · 0.85

Tested by

no test coverage detected