SYS_GetFreeMemory Function

Action

Returns the amount of free memory.

Syntax

iFree = SYS_GetFreeMemory ( )
Variable Description
iFree The number of bytes of free memory. INTEGER.

Notes

SYS_GetFreeMemory returns an integer that specifies the number of bytes of memory that are free at the time the function is called.

Call SYS_GetFreeMemory before you start the application you are testing (with the Start or Invoke method). Then call it again after the application is running to see how much system memory it requires.

SYS_GetFreeMemory is executed by the Agent process, not the Silk Test Classic process. To affect the host process, use the function with the hHost notation or machine handle operator. For more information about the machine handle operator and hHost, see Machine handle operator.

You can use this function in an environment that uses the Open Agent or Classic Agent. Silk Test Classic automatically uses the appropriate Agent.

Windows

The value SYS_GetFreeMemory returns is the same value that is displayed in the Program Manager’s About dialog.

The value returned by SYS_GetFreeMemory is not useful with 32-bit Windows.

Example

INTEGER iFreeMem
iFreeMem = SYS_GetFreeMemory ()
Print ("Number of free memory blocks: {iFreeMem}")