RtQueryLocalMemory

RtQueryLocalMemory returns RTSS deterministic memory pool information, including the pool size as a whole, the free memory size available, the maximum virtually contiguous free memory size. RtQueryLocalMemory is only supported in the RTSS environment. It cannot be called from a Windows application linked to RTX.

Syntax

BOOL RtQueryLocalMemory(
    PULONG MemSize,
    PULONG MemAvail,
    PULONG MemContig
);

Parameters

MemSize

A pointer to an unsigned long returned with the RTSS memory pool size in bytes as a whole, including free and allocated memory

MemAvail

A pointer to an unsigned long returned with the free memory size (in bytes) available in the RTSS memory pool

MemContig

A pointer to an unsigned long returned with the maximum free memory size (in bytes), which is virtually contiguous, in RTSS memory pool

Return Values

TRUE if the function succeeds, FALSE otherwise

Remarks

If the RTSS memory pool has not been created yet or if there is insufficient free memory in the pool for the requested allocation, there is SRI activity involved in RtAllocateLocalMemory call and the deterministic feature is lost. To avoid that, call RtQueryLocalMemory first to make sure there is enough free memory in the RTSS memory pool.

Requirements

Header Rtapi.h
Library Rtx_Rtss.lib

See Also:

RtAllocateLocalMemory

RtFreeLocalMemory

IntervalZero.com | Support | Give Feedback