RtExpandMSpace

RtExpandMSpace expands the specified MSpace by the size specified.

Syntax

BOOL RtExpandMSpace(
    mspace MSpace,
    ULONG Size
);

Parameters

MSpace

A descriptor to the external or internal MSpace of an RTSS process, as returned by RtGetProcessMSpace. If NULL is specified, the external allocation space of the current process is expanded.

Size

An unsigned long specifying the size, in bytes, by which to expand the MSpace.

Return Value

Returns TRUE if the function succeeds. Returns FALSE if the function fails.

Remarks

RtExpandMSpace allows you to explicitly expand the MSpace. The expanded memory will be added to the free memory in the MSpace’s local pool. If the local pool is not initialized yet, RtExpandMSpace will initialize the pool with the minimum size threshold configured via the RTX64 Control Panel plus Size.

Calling RtExpandMSpace in a Windows process with the MSpace parameter set to NULL will expand the associated proxy process’ external MSpace.

NOTE: The RtExpandMSpace call involves an interaction with Windows. As a result, it is non-deterministic and cannot be called in a shutdown handler.

Requirements

Minimum Supported Version RTX64 4.0
Header Rtapi.h
Library RtApi.lib (Windows), Rtx_Rtss.lib (RTSS)

See Also:

RtGetProcessMSpace

RtShrinkMSpace