memoryuse
memoryuse |
Purpose
Synopsis
function memoryuse:real
function memoryuse(ent:any entity):real
function memoryuse(mname:string):real
Arguments
ent
|
An entity
|
mname
|
A Module name
|
Return value
An estimate of the memory usage in bytes or
-1 if the evaluation cannot be performed.
Further information
1. When used with no argument this function returns the total amount of memory used by the running model including the loaded modules (if they implement the functionality). A constant string is interpreted as the name of a module: the returned value is the memory consumed by this module that must be currently used by the model.
2. For entities of type
integer,
real,
boolean and
mpvar the value returned is the constant amount of memory required by a variable of the corresponding type. For a reference to a
string or
linctr the effective memory used by the internal datastructure is returned. In the case of a set or a list only the memory used to represent the collection is accounted, not its content. However the value reported for an array or record includes the memory used by the content of the structure except for strings.
Related topics