RtAllocateLockedMemory
RtAllocateLockedMemory commits and locks the specified amount of memory to avoid page faults as the memory is used.
Syntax
PVOID RtAllocateLockedMemory(
UINT nNumberOfBytes
);
Parameters
nNumberOfBytes
An unsigned integer specifying the number of bytes to allocate, commit, and lock.
Return Value
If the function succeeds, it returns a pointer to the allocated memory. If the function fails, it returns a NULL pointer.
Remarks
RtAllocateLockedMemory allocates memory in the virtual address space of the process, commits that space to physical memory, and locks that physical memory. The committed locked memory will not incur page faults when the memory is used, nor will the system page the allocated memory out to secondary storage.
Requirements
Minimum supported version | Header | Library |
---|---|---|
eRTOS 1.0 SDK |
RtssApi.h | rtkrnl.lib |
See Also: