RtAllocateContiguousMemorySpecifyCache
The RtAllocateContiguousMemorySpecifyCache routine allocates a range of physically contiguous, cache-aligned memory.
Syntax
PVOID RtAllocateContiguousMemorySpecifyCache(
ULONG Length,
LARGE_INTEGER LowestPhysAddr,
LARGE_INTEGER HighestPhysAddr,
LARGE_INTEGER BoundaryPhysAddrMultiple,
MEMORY_CACHING_TYPE CacheType,
);
Parameters
Length
Specifies the number of bytes to allocate.
LowestPhysAddr
Specifies the lowest valid physical address that the process can use.
HighestPhysAddr
Specifies the highest valid physical address that the process can use.
BoundaryPhysAddrMultiple
If nonzero, this value specifies the physical address multiple that the allocated buffer must not cross. A physical address multiple must always be a power of two. This parameter is optional and can be specified as zero to indicate that the device has no special memory boundary restrictions.
CacheType
Specifies a MEMORY_CACHING_TYPE value, which indicates the type of caching allowed for the requested memory.
Return Value
RtAllocateContiguousMemorySpecifyCache returns the base virtual address for the allocated memory. If the system is unable to allocate the request buffer, the routine returns NULL.
Remarks
Processes typically use the RtAllocateContiguousMemorySpecifyCache routine to allocate memory at initialization. For more information, see RtAllocateContiguousMemory.
If you specify a nonzero value for the BoundaryPhysAddrMultiple parameter, the allocated memory address range will not contain an address that is an integer multiple of this value. A process would normally specify a nonzero value only to work around a hardware limitation. For example, if a device cannot transfer data across 64-kilobyte physical boundaries, the process should specify a value of 0x10000 to ensure that the addresses that the device sees do not wrap around the 64-kilobyte boundary.
Warning Memory that RtAllocateContiguousMemorySpecifyCache allocates is uninitialized.
Requirements
Minimum Supported Version | RTX64 2013 |
Header | Rtapi.h |
Library | RtApi.lib (Windows), Rtx_Rtss.lib (RTSS) |