PREV UP NEXT StackThreads/MP: version 0.77 User's Guide

4.1: Parallel Conservative Garbage Collector (SGC)

SGC is a conservative garbage collection (GC) library for shared-memory platforms. Its interface is the same as malloc, but calls to malloc are serialized only occasionally. In addition, it provides GC. A GC is also performed in parallel. If your particular program suffers from GC, you can control when to invoke a GC for better performance. If you are a creature who irrationally thinks GC is a slow thing, you can turn off GC and explicitly free objects (in this case you are effectively using SGC as a concurrent malloc/free library). SGC is provided as a separate library. You can obtain it from http://www.yl.is.s.u-tokyo.ac.jp. To use it from StackThreads/MP programs, you must define WITH_STHREADS in config.mk when you compile it, and you must define WITH_SGC when you compile StackThreads/MP library. See README.parallel in SGC for details. It is currently available on SPARC (Solaris), Pentium (Solaris), and R10000 (IRIX). Port to Pentium on Linux will come soon. SGC was derived from Bohem's conservative GC library (which is mainly for sequential platforms) and can be used with or without StackThreads/MP.

  • GC_MALLOC and GC_FREE
  • Controlling GC behavior