Please enable JavaScript to view this site.

ESL Documentation

Action Statement

Define the minimum free memory needed for a program.

set low memory threshold to BYTE_SIZE

BYTE_SIZE

An integer value representing the number of bytes needed to run the program.

Description

Use this statement to set the trigger value for which the response to low memory response statement will be executed. If you use it, place it in the response to start of your program; you can respecify it throughout a program.

If this statement is not specified, a default value of 5000 bytes is used.

Example

 

integer         WarnValue is 10000

         MinValue  is  2000

 

response to start

 set low memory threshold to WarnValue

 ...

 

response to low memory

 squeeze memory

 if (freesize <= WarnValue) then

         action ShowWarnMessage

         copy (WarnValue - 5000) to WarnValue

         if (WarnValue < MinValue) then

                 write TextRegA to file "memreg.sav"

                 exit

         else

                 set low memory threshold to WarnValue

         end if

 end if

See Also

freesize Special Inquiry Built-in Function

response to low memory Response Definition

squeeze memory Action Statement