RtAllocateContiguousMemory
RtAllocateContiguousMemory allocates physically contiguous memory.
Syntax
PVOID RtAllocateContiguousMemory(
[in] ULONG Length,
[in] LARGE_INTEGER PhysicalAddress
);
Parameters
[in] Length
An unsigned 32-bit quantity indicating the amount of memory, in bytes, to allocate.
[in] 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 |
|---|---|---|
|
wRTOS 1.0 SDK |
RtApi.h |
RtApi.lib (Windows), Startup.lib (RTSS) |
See Also: