To decommit physical storage mapped to a region or release an entire region of address space, call the
BOOL VirtualFree( LPVOID pvAddress, SIZE_T dwSize, DWORD fdwFreeType);
Let’s first examine the simple case of calling
VirtualFree to release a reserved region. When your process will no longer be accessing the physical storage within a region, you can release the entire reserved region, and all the physical storage committed to the region, by making a single call to
For this call, the
pvAddress parameter must be the base address of the region. This address is the same address that
VirtualAlloc returned when the region was reserved. The system knows the size of ...