RtAllocateLocalMemoryEx
RtAllocateLocalMemoryEx allocates memory from the external memory allocation space (MSpace) of the current process. RtAllocateLocalMemoryEx allows you to allocate memory without zero-initializing the memory region.
Syntax
PVOID RtAllocateLocalMemoryEx(
ULONG Size,
ULONG Flags
);
Parameters
Size
An unsigned long specifying the number of bytes to allocate.
Flags
The memory allocation option. This parameter can be one or more of the following values:
Value | Meaning |
---|---|
RTALLOC_NOT_ZERO_MEMORY | The allocated memory will not be initialized to zero. |
Return Value
If the function succeeds, it returns a pointer to the memory. If the function fails, it returns a NULL pointer.
Remarks
RtAllocateLocalMemoryEx is a deterministic memory allocation call, provided the MSpace contains the requested memory.
Note: If the local pool is not created, or if the amount of free memory in the pool is not enough for the requested Size, calls to RtAllocateLocalMemory involve Windows interaction, resulting in loss of determinism. To avoid this, call RtQueryProcessMSpace first to make sure there is enough free memory in the MSpace.
Requirements
Minimum supported version | Header | Library |
---|---|---|
eRTOS 1.0 SDK |
RtssApi.h | rtkrnl.lib |
See Also: