RtAllocateContiguousMemory
RtAllocateContiguousMemory allocates physically contiguous memory.
Syntax
PVOID RtAllocateContiguousMemory(
ULONG Length,
LARGE_INTEGER PhysicalAddress
);
Parameters
Length
An unsigned 32-bit quantity indicating the amount of memory, in bytes, to allocate.
PhysicalAddress
The highest physical address that can be part of the range allocated.
Return Value
If the function succeeds, it returns a pointer to the memory. If the function fails, it returns a NULL pointer.
Remarks
RtAllocateContiguousMemory allocates memory in the virtual address space of the process, backed by contiguous, non-paged physical memory. The second argument allows the user to specify the highest acceptable physical address. If this memory is used with certain hardware devices, an upper-addressing limit may be imposed by the design of the hardware device.
Note: The amount of non-paged, contiguous memory available is relatively limited, and is rapidly fragmented during normal system operation. Applications should use this resource carefully and obtain allocations early in operation.
Requirements
Minimum supported version | Header | Library |
---|---|---|
eRTOS 1.0 SDK |
Rtapi.h | rtkrnl.lib |
See Also: