D3PLOT 22.1

Garbage Collection Memory Size

Garbage Collection Memory Size

Whenever a javascript creates an object, array or string variable, some memory needs to be allocated by the computer. When the variable goes out of scope (is no longer reachable) this memory needs to be returned. This is done automatically in JavaScript by a process called garbage collection.

The garbage collection process runs periodically when this memory use reaches a certain level. To be able to do this, the garbage collection process itself also requires a small amount of memory to keep track of all of the variables.

Prior to version 22.0, this garbage collection memory was a fixed size and had to be allocated before any scripts could run. The default size for this was 25Mb and there was a textbox on the script panel to change this to a larger value if required..

In D3PLOT 22.0 the garbage collection memory is now expanded automatically as required to run the script(s). There is no longer any need to give the garbage collection memory size, so the textbox to specify the memory has been removed. 

However, if you know in advance that your script has to retain a large number of objects, arrays, strings etc in memory then it might be beneficial to start the script with a larger memory, rather than letting D3PLOT gradually increase the memory.  This can be done using the d3plot*javascript_memory_size preference or adding a special memory comment at the top of the script.

The maximum size of garbage collection memory that D3PLOT can allocate is 4Gb. Note that this is the memory for the 'garbage collection' process, NOT the total memory for the script. The total memory for the script could be significantly higher than this value. If D3PLOT is being run on a machine that is shared by several users and you want to limit the size of the memory for scripts, rather than expanding it automatically to 4Gb you can use the preference

oasys*javascript_maximum_memory_size