The Prolog interpreter performs regularly a check point. The frequency is controlled by the pa-rameters GC_MAX_INFERS, which has been chosen so that a rate of ca. 60 Hz is archived. If in asynchronous mode, the Prolog interpreter yields during the check point allowing it to be non-blocking in a single threaded host.
Further during this check point we decided whether to invoke a
major garbage collection or a minor garbage collection. A major
garbage collection is a full garbage collection where we also
update the serno interval and counter. A minor garbage collection
is a generational garbage collection without updating the serno
interval and counter.
Since major and minor garbage collection are triggered very
defensively, they might be not triggered at all, so that the serno
counter might exhaust. We therefore have a further frequency
parameter GC_MAX_DIRTY, which has been chosen so that a rate of
ca. 1/60 Hz is archived. It will unconditionally trigger a major
garbage collection.
The values are currently:
/* JavaScript, nodeJS */
GC_MAX_INFERS = 92000
GC_MAX_DIRTY = 331200000
/* JavaScript, Browser */
GC_MAX_INFERS = 61000
GC_MAX_DIRTY = 219600000
/* Python */
GC_MAX_INFERS = 55000
GC_MAX_DIRTY = 198000000
/* Java */
GC_MAX_INFERS = 200000
GC_MAX_DIRTY = 720000000