The MEM command displays statistics about the model generator’s memory usage. The following is some sample output from the MEM command:

: MEM

 

Total generator memory           5242880

Peak generator memory usage        12048

Current generator memory usage      1312

 

Total handles                         96

Peak handle usage                      9

Current handle usage                   5

 

Total bytes moved                   1552

Total blocks moved                     6

Total heap compacts                    0

 

Fragmentation ratio                0.002

 

:

The Total generator memory figure is the amount of memory LINGO has allocated for a working memory heap for model generation. You can control the size of this heap using the SET command. Peak generator memory usage refers to the maximum amount of memory the model generator used during the current session. Current memory usage lists the amount of working memory currently in use by the model generator.

Total handles is the maximum number of memory blocks LINGO can allocate. Peak handle usage lists the maximum number of memory blocks LINGO allocated at any one time during this session. Current handle usage represents the number of memory blocks currently in use by the model generator.

Total bytes moved lists the number of memory bytes the generator has had to move so far in order to reallocate memory. Total blocks moved lists the number of memory blocks moved due to reallocation. Total heap compacts lists the number of times the generator has had to compact the heap to make room for growing memory needs. If the number of heap compacts is abnormally large, you should allocate more working memory using the SET command.

The Fragmentation ratio is a statistic measuring how fragmented the memory heap is. A value of 1 would indicate high fragmentation, where a value of 0 indicates no fragmentation