summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-01-17 21:34:11 +0100
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:55 +0200
commitce3582069e602d1e6d1d1b17a2336484150fdef5 (patch)
treeaa551be24ae9aa1a96cf9cc8d628752b0f88f7c4 /misc.c
parent548e10e7a9bb0bef92f12f2b974670e30d69d914 (diff)
2011-01-17 Ivan Maidanski <ivmai@mail.ru>
* allchblk.c (GC_use_entire_heap): Change type to int (as declared in gc.h); set the default value depending on new GC_USE_ENTIRE_HEAP macro. * misc.c (GC_init): Test GC_USE_ENTIRE_HEAP environment variable to alter the default value of GC_use_entire_heap. * doc/README.environment (GC_USE_ENTIRE_HEAP): Document. * doc/README.macros (GC_USE_ENTIRE_HEAP): Ditto.
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/misc.c b/misc.c
index d350b73..b4e47b8 100644
--- a/misc.c
+++ b/misc.c
@@ -827,6 +827,17 @@ GC_API void GC_CALL GC_init(void)
}
}
}
+ {
+ char * string = GETENV("GC_USE_ENTIRE_HEAP");
+ if (string != NULL) {
+ if (*string == '0' && *(string + 1) == '\0') {
+ /* "0" is used to turn off the mode. */
+ GC_use_entire_heap = FALSE;
+ } else {
+ GC_use_entire_heap = TRUE;
+ }
+ }
+ }
# endif
maybe_install_looping_handler();
/* Adjust normal object descriptor for extra allocation. */