Next: , Previous: , Up: ref-mgc   [Contents][Index]


4.10.3 Enabling and Disabling the Garbage Collector

The user has the option of executing programs with or without garbage collection. Procedures that do not use a large amount of global stack space before backtracking may not be affected when garbage collection is enabled. Procedures that do use a large amount of global stack space may execute more slowly due to the time spent garbage collecting, but will be more likely to run to completion. On the other hand, such programs may run faster when the garbage collector is enabled because the virtual memory is not expanded to the extent that “thrashing” occurs. The gc Prolog flag can be set to on or off. To monitor garbage collections in verbose mode, set the gc_trace flag to verbose. By default, garbage collection is enabled.


Send feedback on this subject.