Periodically performs a memory check:
If more than a certain amount of available system memory is
allocated, as reported by the underlying operating system,
the alarm
If any Erlang process
Alarms are reported to the SASL alarm handler, see
The alarms are cleared automatically when the alarm cause is no longer valid.
The function
There is also a interface to system dependent memory data,
A call to
The total system memory reported under UNIX is the number of physical pages of memory times the page size, and the available memory is the number of available physical pages times the page size. This is a reasonable measure as swapping should be avoided anyway, but the task of defining total memory and available memory is difficult because of virtual memory and swapping.
The following configuration parameters can be used to change the default values for time intervals and thresholds:
The time interval, in minutes, for the periodic memory check. The default is one minute.
The threshold, as percentage of system memory, for how much system memory can be allocated before the corresponding alarm is set. The default is 0.80 (80%).
The threshold, as percentage of system memory, for how much system memory can be allocated by one Erlang process before the corresponding alarm is set. The default is 0.05 (5%).
A timeout, in seconds, for how long the
The default is 30 seconds.
Specifies whether the
It is recommended to set this parameter to
See
Returns the result of the latest memory check, where
The function is normally asynchronous in the sense that it does not invoke a memory check, but returns the latest available value. The one exception if is the function is called before a first memory check is finished, in which case it does not return a value until the memory check is finished.
Returns
Invokes a memory check and returns the resulting, system
dependent, data as a list of tagged tuples, where
All memory sizes are presented as number of bytes.
The
Returns the empty list [] if
On linux the memory available to the emulator is
Returns the wordsize of the current running operating system.
Returns the time interval, in milliseconds, for the periodic memory check.
Changes the time interval, given in minutes, for the periodic memory check.
The change will take effect after the next memory check and is
non-persistent. That is, in case of a process restart, this
value is forgotten and the default value will be used. See
Returns the threshold, in percent, for process memory allocation.
Changes the threshold, given as a float, for process memory allocation.
The change will take effect during the next periodic memory
check and is non-persistent. That is, in case of a process
restart, this value is forgotten and the default value will be
used. See
Returns the threshold, in percent, for system memory allocation.
Changes the threshold, given as a float, for system memory allocation.
The change will take effect during the next periodic memory
check and is non-persistent. That is, in case of a process
restart, this value is forgotten and the default value will be
used. See
Returns the timeout value, in seconds, for memory checks.
Changes the timeout value, given in seconds, for memory checks.
The change will take effect for the next memory check and is
non-persistent. That is, in the case of a process restart, this
value is forgotten and the default value will be used. See