Skip to content

Memory

Obsolete

This command is valid only in character-mode DataFlex. It has no real meaning in the Windows environment.

Purpose

To aid program development by outputting the amount of unused memory in the computer as the program runs.

Syntax

Memory {variable}

What It Does

The Memory command places the number of bytes of memory in the computer that is not being used at the time the command is executed in the specified variable.

When a program runs out of memory at runtime, it reports DataFlex Error 10 (Out of memory) and aborts the program. Using Memory commands at key points "upstream" of where this happens can help you pinpoint which commands or errors are causing excessive memory consumption.

Because the Out of memory error is provided, displays of available memory are usually of little use or interest to operators of programs. Memory commands are typically removed from programs before they are released for general use.

Notes

  • Memory is consumed by images, commands, in-memory variables, constants, database files opened, and objects.

  • The maximum value returned by the Memory command is 64 Megabytes (67,108,864 bytes). This is due to the extremely high amount of memory that a UNIX or an OS/2 system may report as being available. If less than 64 Megabytes of memory is available on the system, the actual value is reported by this command.