Home |
RTTarget-32 Programming Manual Function RTLockHeap Function RTReserveVirtualAddress Function RTReleaseVirtualAddress Function RTAllocPhysPageAligned Function RTGetProcessPhysMemHeap System Management BIOS (SMBIOS) Advanced Programmable Interrupt Controller (APIC) |
Function RTLockHeapRTLockHeap can be used to protect RTTarget-32 memory management functions from being reentered in multi-thread applications: void RTLockHeap(void); RTTarget-32's Win32 memory management functions (VirtualAlloc, VirtualFree) and RTAllocPhysPageAligned use an internal critical section to protect RTTarget-32's internal memory management state. All of the run-time system's memory management functions map onto these functions. However, RTTarget-32's memory management and mapping functions (RTFindPhysMem, RTReserveVirtualAddress, RTReleaseVirtualAddress, RTMapMem, RTMapPhysMem, RTMapPhysMemEx, RTExtendHeap, and RTCMOSExtendHeap) do not use this critical section automatically. If any of these functions are called while any other memory management function could be called by another thread, the RTTarget-32 heap must be locked explicitly with this call and unlocked with function RTUnlockHeap. Use of this function is only required in multi-thread applications after threads have been created. In single-thread programs, it does nothing.
|