memory

These commands report the current state of LaGriT's dynamic memory allocation. LaGriT arrays are referenced by memory management by a two part name, block name and partition name. It is allocated in integer or real blocks(real is implemented as real*8). Each memory block is preceeded by a header and terminated by a trailer. Different platforms will have different values for integer and real word lengths. LaGriT developers read more on LaGriT memory management at Memory Manager


The following memory keywords are recognized:
 
memory / verify  
verify the integerity of LaGriT memory manager storage by checking that the known blocks have not been overwritten. If corruption is detected, an array map will be printed. Nothing is printed if there memory is successfully verified.



memory / print  
print an address map of the LaGriT managed arrays. For each array the following is printed; index, length, type, memory address, associated name, and partition. The partition is the grouping of arrays by usage. Common partitions include the mesh object (by name), global memory, and temporary memory for work arrays.

MEMORY SIZES : 
 Sizeof char    (type 3) =  1 bytes      Sizeof long        =   4 bytes
 Sizeof real*8  (type 2) =  8 bytes      Sizeof pointer     =   4 bytes
 Sizeof integer (type 1) =  4 bytes      Sizeof INT_PTRSIZE =   4 bytes

INDEX         LENGTH    TYPE     ADDRESS     NAME                           PARTITION
  29          40000000   2     -1894248416 xic                              cmo1    
   1                10   3       143632720 global_name                      global_lg
  31          40000000   2      1760710688 zic                              cmo1    
  30          40000000   2      2080714784 yic                              cmo1   

Total BYTES =    2.400E+09   Total MEGABYTES =    2.400E+03



memory / maxmalloc  
Report estimate of possible amount of memory available for allocation by LaGriT. This test will make incremental calls to internal LaGriT memory allocation (mmgetblk) until failure. The report will include the total Megabytes where allocation succeeded, and amount at which allocation failed. This command will also print a map of the memory manager storage.
 .... 
 
 Malloc by increasing block sizes of   200000
 Succeeded at    1638.40000000000  MEGABYTES
 Failed before   4915.20000000000  MEGABYTES



EXAMPLES:
memory / verify
memory / print
memory / maxmalloc