RtAllocateLocalMemory

RtAllocateLocalMemory allocates memory from the external allocation space (MSpace) of the current process.

Syntax

Copy
PVOID RtAllocateLocalMemory(
    ULONG Size
);

Parameters

Size

An unsigned long specifying the number of bytes to allocate.

Return Value

If the function succeeds, it returns a pointer to the memory. If the function fails, it returns a NULL pointer.

Remarks

RtAllocateLocalMemory is a deterministic memory allocation call , provided the memory is available in the MSpace of the process or kernel.

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 RtQueryProcessMSpacefirst to make sure there is enough free memory in the MSpace.

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

Rtapi.h rtkrnl.lib

See Also: