Home |
RTTarget-32 Programming Manual Running Win32 Programs without Win32 Running a Program on the Target Alternate Heap Manager RTTHeap Extended RAM Management Compiling and Linking with On Time RTOS-32 |
Extended RAM ManagementThe term Extended RAM is used to denote RAM installed on physical addresses >= 4G. Such RAM cannot be accessed directly from a 32 bit application with virtual pointers having only 32 bits, but Extended RAM has physical addresses with 33 or more bits. RTTarget-32 has an Extended RAM Management API which can be used to map Extended RAM into the virtual address space of the application. For this purpose, Extended RAM is partitioned into Blocks, where each block has a size of 4 megabytes. Function RTT_ERAM_BlocksAvail can be used to query how many Extended RAM blocks are available. Function RTT_ERAM_AllocBlocks can be used to allocate memory blocks above 4G and map them into the 32 bit address space below 4G. This function is used by the ERAM heap. ERAM WindowsAny number of ERAM blocks can be mapped into a memory Window located at a virtual address below 4G, allowing the application to access the Extended RAM block. The window also has a size of 4M. Function RTT_ERAM_Alloc can be used to allocate one or more sets of Extended RAM blocks. Function RTT_ERAM_MapBlock maps one of the allocated ERAM blocks into the address space of the application. Unlike the ERAM heap, the ERAM windows can access any number of ERAM blocks up to 1 terabytes. ERAM HeapThe ERAM heap consists of RAM with physical addresses above 4G mapped to virtual addresses below 4G. The ERAM heap can extend the heap capacity on some boards up to about 1 gigabyte. RTTarget32Flag RT_HEAP_USE_ERAM can instruct the heap manager to use the new ERAM heap automatically if the default process heap is out of memory. The Win32 handle for the ERAM heap can be retrieved with function RTGetProcessERAMHeap. Please note that some drivers, which transer data via DMA, cannot transfer data to or from physical adresses which need more than 32 bits. In particular, this is the case for these RTFiles-32 drivers: RTFDrvFloppy, RTFDrvIDE, RTFDrvDOC, RTFDrvSD, RTFDrvSRAM. These RTFiles-32 drivers can handle ERAM: RTFDrvAHCI, RTFDrvNVMe, RTFDrvRAM, RTFDrvERAM, RTFDrvFlash, RTFDrvUSB (only for USB devices connected on an XHCI controller). For RTUSB-32, only the XHCI driver can handle ERAM. The UHCI, OHCI, and EHCI drivers cannot. Please note that even on systems with only 4G of RAM installed, Extended RAM will usually be available as some physical address space below 4G is reserved for the BIOS, PCI, display frame buffer, etc. All RAM which is not accessible in the physical address space below 4G will usually be available at and above 4G. For example, systems with 8G RAM installed will typically have about 3.5G conventional RAM and 4.5G of Extended RAM. Alternate Heap Manager RTTHeap
|