Section 6: Instrument programming
Model 2651A High Power System SourceMeter® Instrument Reference Manual
6-46
2651A-901-01 Rev. A / March 2011
Memory considerations for the runtime environment
The runtime environment has a fixed amount of memory for storing user scripts and other run-time
information.
The Model 2651A reserves 32 MB of memory for dynamic runtime use. Approximate allocation of this
memory is shown below:
5 MB
Firmware general operation
1 MB
Reserve for instrument internal operation
2 MB
Reserve for future firmware updates
24 MB
Runtime environment, user-created reading buffers, and active sweep
configuration
The runtime environment, user-created reading buffers, and active sweep configuration must fit within
the 24 MB of memory available. The amount of memory used by a reading buffer is approximately 15
bytes for each entry requested. A reading buffer uses a slight amount of these resources, but it is not
significant when making memory utilization calculations. For example, assume two reading buffers
were created. One of them was created to store up to 1,000 readings and the other 2,500. The
memory reserved for the reading buffers is calculated as follows:
(1000 * 15) + (2500 * 15) = 52,500 bytes or 52.5 kilobytes.
Note that the dedicated reading buffers do not consume memory needed by the runtime environment;
do not include them in your memory consumption calculations. Also, reading buffers for remote nodes
consume memory on the remote node, not the local node. You should be sure the total reading buffer
memory for any particular remote node does not exceed 24 MB, but do not include that amount in
your local memory consumption calculations.
The amount of memory used by a sweep configuration is based on the number of source points. The
actual memory consumption can vary greatly depending on the source-measure unit (SMU) settings,
but as a general rule, each source point can be expected to consume at least 24 bytes.
It is possible for the memory used for these purposes to exceed 24MB. When this occurs, there is a
risk that memory allocation errors will be generated and commands will not be executed as expected.
If memory allocation errors are encountered, the state of the instrument cannot be guaranteed. After
attempting to save any important data, it is recommended that you turn off power to the instrument
and turn it back on to return the instrument to a known state. Turning the power on and off resets the
runtime environment.
Unsaved scripts and reading buffers will be lost. The amount of memory in use can be checked using
the
meminfo()
function. The first value returned by
meminfo()
is the number of kilobytes of
memory in use.
If the amount of memory used is over 95%, or if you receive out-of-memory errors, you should reduce
the amount of memory that is used.