Home |
RTTarget-32 Programming Manual Function RTReserveVirtualAddress Function RTReleaseVirtualAddress Function RTAllocPhysPageAligned Function RTGetProcessPhysMemHeap System Management BIOS (SMBIOS) Advanced Programmable Interrupt Controller (APIC) |
Function RTAllocPhysPageAlignedFunction RTAllocPhysPageAligned can allocate contiguous 4k aligned pages of physical memory: void * RTAllocPhysPageAligned(unsigned Bytes); Parameter Bytes is rounded up to the next multiple of 4k and specifies the number of bytes to allocate. The function returns a virtual pointer with read/write access to the memory or NULL if the function fails. The memory is located at the same address in the physical address space as in the virtual address space. The allocated block is contiguous in the physical and in the virtual address space. RTAllocPhysPageAligned fails when either physical memory is exhausted or when the fixed memory manager is being used with paging enabled, and more than 4096 bytes (1 page) are requested. Use this function only if you need 4k page aligned physical memory. RTAllocPhysPageAligned is subject to more fragmentation than other allocation mechanisms. For smaller physical memory blocks, use RTGetProcessPhysMemHeap with HeapAlloc. Memory allocated through RTAllocPhysPageAligned cannot be deallocated. Function RTGetProcessPhysMemHeap
|