Home |
RTTarget-32 Programming Manual Function RTCMOSExtendHeap System Management BIOS (SMBIOS) Advanced Programmable Interrupt Controller (APIC) |
Function RTCMOSExtendHeapRTCMOSExtendHeap uses information from the BIOS to determine the amount of physical memory installed. If more memory than currently used is found, the extra RAM is added to the heap: int RTCMOSExtendHeap(void); This function analyses the memory map retrieved by the boot code Biosboot.exe. Any available RAM not already declared in a Region command of the application's .cfg files will be added to the heap through function RTExtendHeap. If no memory map is found, function RTGetExtMem is used instead. For possible return codes and additional information, please refer to function RTExtendHeap. RTCMOSExtendHeap should only be called from an Init functions. If the program uses the virtual memory manager, RTExtendHeap will not add pages above address 2G, unless RTTarget-32 flag RT_EXTEND_All_RAM has been set. This prevents the virtual address space from being used up by many physical pages. To use more than 2G of RAM, use RTTarget-32 flags RT_USE_PHYS_MEM_HEAP and RT_EXTEND_All_RAM. This function will also use the BIOS's memory map to check that the .cfg files used to build the application do not declare any RAM which is not available. If such RAM is found, a warning message will be displayed with the name of the affected Region as well as the address and size of the unavailable RAM. Example:Unavailable RAM in use in Region MoreLowMem at 0008F000h, Size: 64k In this example, Region MoreLowMem is too large and includes RAM which is being used by the BIOS. To solve this problem, the declaration of Region MoreLowMem should be removed or modified such that the given address range is no longer included. This function requires a PC compatible BIOS with support for int 15h function E820h or E801h.
|