Please enable JavaScript to view this site.

ESL Documentation

Special Inquiry Built-in Function

Return the byte size of the largest available block of memory free to be used.

freesize

Description

Use this function to find the byte size of the single largest available block of memory free to be used by the ESL program. This function is useful for monitoring memory use within your program.

Use the freesize function in conjunction with the response to low memory response statement and the set low memory threshold and squeeze memory action statements.

The freesize function returns an integer. The value includes the sum of all available memory only when it is checked immediately after the squeeze memory action statement. The squeeze memory statement is often used in conjunction with freesize, since it will reorder memory, collecting all free memory together.

Example

 

response to low memory

 squeeze memory

 if (freesize < 200) then

         change to program Alternate_Choices

 end if

See Also

response to low memory Response Definition

set low memory threshold Action Statement

squeeze memory Action Statement