Platform SDK: Memory |
The FreeUserPhysicalPages function frees physical memory pages previously allocated with AllocateUserPhysicalPages. If any of these pages are currently mapped in the AWE region, they are automatically unmapped by this call. Note this does not affect the virtual address space occupied by the specified AWE region.
BOOL FreeUserPhysicalPages( HANDLE hProcess, // handle to process PULONG_PTR NumberOfPages, // pages to free PULONG_PTR UserPfnArray // virtual address );
If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE. In this case, the NumberOfPages parameter will reflect how many pages have actually been released. To get extended error information, call GetLastError.
In a multiprocessor environment, this function maintains coherence of the hardware translation buffer. Upon return from this function, all threads on all processors are guaranteed to see the correct mapping.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.
Memory Management Overview, Memory Management Functions, Address Windowing Extensions, AllocateUserPhysicalPages, MapUserPhysicalPages, MapUserPhysicalPagesScatter