Determine the amount of available free pool memory

     MEMORY(<nExp>) --> nKbytes


     <nExp> is a numeric value that determines the type of value MEMORY()
     returns as follows:

     MEMORY() Argument Values
     Value     Meaning
     0         Estimated total space available for character values
     1         Largest contiguous block available for character values
     2         Area available for RUN commands


     MEMORY() returns an integer numeric value representing the amount of
     memory available, in one -kilobyte increments.


     MEMORY() is an environment function that reports various states of free
     pool memory.  (Free pool is the dynamic region of memory that stores
     character strings and executes RUN commands.)


     .  This example uses MEMORY() before a RUN command to determine
        if there is enough memory available to execute the external program:

        #define MEM_CHAR   0
        #define MEM_BLOCK   1
        #define MEM_RUN      2
        IF MEMORY(MEM_RUN) >= 128
           RUN MYPROG
           ? "Not enough memory to RUN"

 Files   Library is CLIPPER.LIB.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.