Object GC

Support for script-based garbage collection strategies.

object GC

Summary

itemsSingle GC sensible items currently allocated.
th_activeThreshold of occupied memory above which the GC will enter the active mode.
th_normalThreshold of occupied memory above which the GC will enter the normal mode.
usedMemMemory used by the Falcon engine.
adjust()Sets or gets the automatic threshold levels adjust algorithm.
enable()Turns automatic GC feature on or off.
perform()Requests immediate check of garbage.

Properties

items

Single GC sensible items currently allocated.

th_active

Threshold of occupied memory above which the GC will enter the active mode.

th_normal

Threshold of occupied memory above which the GC will enter the normal mode.

usedMem

Memory used by the Falcon engine.

Methods

adjust()

Sets or gets the automatic threshold levels adjust algorithm.

GC.adjust( [mode] )

modeThe adjust mode used by the GC.
Returns:The mode currently set.

Mode can be one of:

enable()

Turns automatic GC feature on or off.

GC.enable( mode )

modetrue to turn automatic GC on, false to turn it off.

Virtual machines and some heavy garbage generating functions call periodically a function that checks for the level of allocated memory to have reached a critical point. When there is too much allocated memory of uncertain status, a garbage collecting loop is started.

By setting this property to false, this automatic control is skipped, and allocated memory can grow up to physical process limits (or VM memory limit constraints, if provided). Setting this value to true will cause VM to perform memory control checks again with the usual strategy.

In case the script is sure to have generated a wide amount of garbage, it is advisable to call explicitly GC.perform() before turning automatic GC on, as the "natural" collection loop may start at any later moment, also after several VM loops.

perform()

Requests immediate check of garbage.

GC.perform( [wcoll] )

wcollSet to true to wait for the collection of free memory to be complete.
Returns:true if the gc has been actually performed, false otherwise.

Suspends the activity of the calling Virtual Machine, waiting for the garbage collector to complete a scan loop before proceeding.


Made with faldoc 2.2.0