Frees physical memory associated with the calling thread's virtual address space.
DWORD FreeRtMemory(
PVOID pAddress, // location of memory to be freed within calling thread's virtual segment
);
pAddress
The virtual memory at the address referenced by pAddress is freed, up to the end of the allocation.
If the value of pAddress was originally returned from a call to AllocateRtMemory, the operation also frees all contiguous physical memory that is found at address, even if the contiguous block begins before offset. In other words, FreeRtMemory deletes all memory previously allocated from a single call to AllocateRtMemory.
If the physical memory pointed to by offset was mapped by a previous call to MapRtPhysicalMemory or MapRtPhysicalMemoryEx or MapRtPhysicalMemory64 or MapRtSharedMemory or MapRtPhysicalMemoryList or MapRtPhysicalMemoryList64 or ReMapPhysicalMemory or ReMapPhysicalMemory64, no physical memory is deallocated. The return value may be higher than the size of the mapping due to internal architectural considerations.
-1
E_OK 0x0000
E_NOT_ALLOCATED 0x00F2
E_BAD_ADDR 0x800F
pAddress is invalid. One of these conditions exist:
pAddress is outside the calling thread's virtual address space.
| Versions | Defined in | Include | Link to |
|---|---|---|---|
| INtime 3.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |