1 The garbage collector looks at a number of environment variables which are
2 then used to affect its operation. These are examined only on Un*x-like
5 GC_INITIAL_HEAP_SIZE=<bytes> - Initial heap size in bytes. May speed up
8 GC_LOOP_ON_ABORT - Causes the collector abort routine to enter a tight loop.
9 This may make it easier to debug, such a process, especially
10 for multithreaded platforms that don't produce usable core
11 files, or if a core file would be too large. On some
12 platforms, this also causes SIGSEGV to be caught and
13 result in an infinite loop in a handler, allowing
14 similar debugging techniques.
16 GC_PRINT_STATS - Turn on as much logging as is easily feasible without
17 adding signifcant runtime overhead. Doesn't work if
18 the collector is built with SMALL_CONFIG. Overridden
19 by setting GC_quiet. On by default if the collector
20 was built without -DSILENT.
22 GC_PRINT_ADDRESS_MAP - Linux only. Dump /proc/self/maps, i.e. various address
23 maps for the process, to stderr on every GC. Useful for
24 mapping root addresses to source for deciphering leak
27 GC_NPROCS=<n> - Linux w/threads only. Explicitly sets the number of processors
28 that the GC should expect to use. Note that setting this to 1
29 when multiple processors are available will preserve
30 correctness, but may lead to really horrible performance.
32 GC_NO_BLACKLIST_WARNING - Prevents the collector from issuing
33 "Needed to allocate blacklisted block at ..." warnings.
35 GC_IGNORE_GCJ_INFO - Ignore the type descriptors implicitly supplied by
36 GC_gcj_malloc and friends. This is useful for debugging
37 descriptor generation problems, and possibly for
38 temporarily working around such problems. It forces a
39 fully conservative scan of all heap objects except
40 those known to be pointerfree, and may thus have other
43 GC_PRINT_BACK_HEIGHT - Print max length of chain through unreachable objects
44 ending in a reachable one. If this number remains
45 bounded, then the program is "GC robust". This ensures
46 that a fixed number of misidentified pointers can only
47 result in a bounded space leak. This currently only
48 works if debugging allocation is used throughout.
49 It increases GC space and time requirements appreciably.
50 This feature is still somewhat experimental, and requires
51 that the collector have been built with MAKE_BACK_GRAPH
52 defined. For details, see Boehm, "Bounding Space Usage
53 of Conservative Garbage Collectors", POPL 2001, or
54 http://lib.hpl.hp.com/techpubs/2001/HPL-2001-251.html .
56 GC_ENABLE_INCREMENTAL - Turn on incremental collection at startup. Note that,
57 depending on platform and collector configuration, this
58 may involve write protecting pieces of the heap to
59 track modifications. These pieces may include pointerfree
60 objects or not. Although this is intended to be
61 transparent, it may cause unintended system call failures.
64 GC_PAUSE_TIME_TARGET - Set the desired garbage collector pause time in msecs.
65 This only has an effect if incremental collection is enabled.
66 If a collection requires appreciably more time than this,
67 the client will be restarted, and the collector will need
68 to do additional work to compensate. The special value
69 "999999" indicates that pause time is unlimited, and the
70 incremental collector will behave completely like a
71 simple generational collector. If the collector is
72 configured for parallel marking, and run on a multiprocessor,
73 incremental collection should only be used with unlimited
76 The following turn on runtime flags that are also program settable. Checked
77 only during initialization. We expect that they will usually be set through
78 other means, but this may help with debugging and testing:
80 GC_FIND_LEAK - Turns on GC_find_leak and thus leak detection.
82 GC_ALL_INTERIOR_POINTERS - Turns on GC_all_interior_pointers and thus interior
85 GC_DONT_GC - Turns off garbage collection. Use cautiously.