+2008-11-10 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Ivan Maidansky)
+ * misc.c, doc/README.environment: Add support for
+ GC_FREE_SPACE_DIVISOR and GC-disable-incremental.
+ * include/gc.h: Make GC_set_free_space_divisor correspond to
+ (somewhat unfortunate) reality.
+
2008-11-07 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
(Mostly improves LLP64 support.)
* backgraph.c, checksums.c, dbg_mlc.c, finalize.c, mark.c,
was turned into a runtime flag to enable last-minute
work-arounds.
+GC_DISABLE_INCREMENTAL - Ignore runtime requests to enable incremental GC.
+ Useful for debugging.
+
The following turn on runtime flags that are also program settable. Checked
only during initialization. We expect that they will usually be set through
other means, but this may help with debugging and testing:
run on a multiprocessor, incremental collection should
only be used with unlimited pause time.
+GC_FREE_SPACE_DIVISOR - Set GC_free_space_divisor to the indicated value.
+ Setting it to larger values decreases space consumption
+ and increases GC frequency.
+
GC_FIND_LEAK - Turns on GC_find_leak and thus leak detection. Forces a
collection at program termination to detect leaks that would
otherwise occur after the last GC.
GC_TRACE=addr - Intended for collector debugging. Requires that the collector
have been built with ENABLE_TRACE defined. Causes the debugger
- to log information about the tracing of address ranges containing
- addr. Typically addr is the address that contains a pointer to
- an object that mysteriously failed to get marked. Addr must be
- specified as a hexadecimal integer.
+ to log information about the tracing of address ranges
+ containing addr. Typically addr is the address that contains
+ a pointer to an object that mysteriously failed to get marked.
+ Addr must be specified as a hexadecimal integer.
GC_API GC_word GC_CALL GC_set_free_space_divisor(GC_word value);
/* Set free_space_divisor. See above for definition. */
/* Returns old value. */
- /* With zero argument, nothing is changed, but old value is */
+ /* With -1 argument, nothing is changed, but old value is */
/* returned. (Only true for GC7.2+) */
/* The following is intended to be used by a higher level */
}
}
}
+ {
+ char * space_divisor_string = GETENV("GC_FREE_SPACE_DIVISOR");
+ if (space_divisor_string != NULL) {
+ int space_divisor = atoi(space_divisor_string);
+ if (space_divisor > 0)
+ GC_free_space_divisor = (GC_word)space_divisor;
+ }
+ }
maybe_install_looping_handler();
/* Adjust normal object descriptor for extra allocation. */
if (ALIGNMENT > GC_DS_TAGS && EXTRA_BYTES != 0) {
/* If we are keeping back pointers, the GC itself dirties all */
/* pages on which objects have been marked, making */
/* incremental GC pointless. */
- if (!GC_find_leak) {
+ if (!GC_find_leak && 0 == GETENV("GC_DISABLE_INCREMENTAL")) {
DCL_LOCK_STATE;
LOCK();