The INTERNAL MEMORY command allows the ROI of a number of different arrays or regions of arrays to be stored internally (V7.27). (This is in addition to the program ``memory''). This command is powerful and dangerous since each extra array that is stored requires more virtual memory from the operating system. Thus, the total demands for virtual memory grow and it may easily be possible to reach the system limits. If this happens a warning message should be produced, but you should be able to carry on using FIT2D, but without the extra saved array. However excessive memory usage should be avoided as it can interfere with other users and the operating system.
Note: This ``internal memory'' operation only saves and recovers the current ROI and not whole of the data arrays. If variance arrays are defined these will also be saved and recovered.
The user is prompted whether to save the current data, or to recover previously saved data. e.g.
INFO: There are currently 0 active data regions stored internally SAVE ACTIVE DATA REGION (``NO'': TO RECOVER) [YES]: ? You are given the choice of saving the current region of interest (\ROI ) or recovering a previously saved region (if one exists). Enter ``YES'' to save the current ROI within internal program memory, or ``NO'' to recover a previously saved ADR. Note: Each time a \ROI\ is saved the program needs to allocate more dynamic memory, so this command should be used with care, and may fail if the computer system cannot allocate more memory. SAVE ACTIVE DATA REGION (``NO'': TO RECOVER) [YES]:
If the current ROI is to be saved, the user is prompted for the number of the memory store to use. If none have been used there is no choice, however if memory stores have already been defined there is a choice between overwriting the a previous store or using a new one. If possible use an existing store to avoid using even more virtual memory. e.g.
INTERNAL STORE NUMBER (Range: 1 to 1) [1]:? Enter number of internal memory to use to store active data region. By default a new memory will be used, unless they are all being used, however each time a new memory is used more virtual memory is necessary. INTERNAL STORE NUMBER (Range: 1 to 1) [1]:
When data has been stored, a list of the titles of each stored ROI will be output when the INTERNAL MEMORY command is issued. e.g.
INFO: There are currently 2 active data regions stored internally 1: Simulated Data 2: A sub-region of the data
To recover a previously saved region enter NO to the SAVE ACTIVE DATA REGION prompt and specify the memory store from which to recover data. e.g.
SAVE ACTIVE DATA REGION (``NO'': TO RECOVER) [NO]: INTERNAL STORE NUMBER (Range: 1 to 2) [2]:? Enter number of internal memory to recover a previously stored active data region. INTERNAL STORE NUMBER (Range: 1 to 2) [2]:1
The data is copied from the memory store into the program array in the same ROI as was used to store the data. Other data which may be present in the program array is not affected. The data in the memory store is still present.
(Note: At present memory stores, once created, cannot be completed destroyed, but virtual memory may be recovered by defining very small ROI's and overwriting the previously stored ROI with the new very small one.)