summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-09-11 23:03:55 +0400
committerIvan Maidanski <ivmai@mail.ru>2012-09-11 23:03:55 +0400
commit9dbe549fded38f9a456004831a9eced840a6ce36 (patch)
tree08e2c078a9257058529b6a6d07a3304481a715d6 /doc
parent8102d42dd2e5b398e1085d5e3a90fdbee5ed6ed1 (diff)
downloadbdwgc-9dbe549fded38f9a456004831a9eced840a6ce36.tar.gz
Enable 'Force GC at every GC_malloc' debug-related functionality
* doc/README.environment (GC_COLLECT_AT_MALLOC): Document. * doc/README.macros (GC_COLLECT_AT_MALLOC): Likewise. * fnlz_mlc.c (GC_core_finalized_malloc): Insert GC_DBG_COLLECT_AT_MALLOC invocation (before LOCK). * gcj_mlc.c (GC_core_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise. * malloc.c (GC_generic_malloc, GC_malloc_atomic, GC_malloc, GC_malloc_uncollectable): Likewise. * mallocx.c (GC_generic_malloc_ignore_off_page, GC_generic_malloc_many, GC_malloc_atomic_uncollectable): Likewise. * typd_mlc.c (GC_malloc_explicitly_typed, GC_malloc_explicitly_typed_ignore_off_page): Likewise. * include/private/gc_priv.h (GC_COLLECT_AT_MALLOC): Recognize new macro. (GC_dbg_collect_at_malloc_min_lb): New global variable declaration (only if GC_COLLECT_AT_MALLOC defined). (GC_DBG_COLLECT_AT_MALLOC): Define new macro (invoking GC_gcollect). * malloc.c (GC_dbg_collect_at_malloc_min_lb): New global variable (only if GC_COLLECT_AT_MALLOC defined). * misc.c (GC_init): Test "GC_COLLECT_AT_MALLOC" environment variable and alter default GC_dbg_collect_at_malloc_min_lb value (only if GC_COLLECT_AT_MALLOC macro defined).
Diffstat (limited to 'doc')
-rw-r--r--doc/README.environment4
-rw-r--r--doc/README.macros4
2 files changed, 8 insertions, 0 deletions
diff --git a/doc/README.environment b/doc/README.environment
index 866e9055..79752f78 100644
--- a/doc/README.environment
+++ b/doc/README.environment
@@ -34,6 +34,10 @@ GC_DUMP_REGULARLY - Generate a GC debugging dump GC_dump() on startup
if you have a bug to report, but please include only the
last complete dump.
+GC_COLLECT_AT_MALLOC=<n> - Override the default value specified by
+ GC_COLLECT_AT_MALLOC macro. Has no effect unless
+ GC is built with GC_COLLECT_AT_MALLOC defined.
+
GC_BACKTRACES=<n> - Generate n random back-traces (for heap profiling) after
each GC. Collector must have been built with
KEEP_BACK_PTRS. This won't generate useful output unless
diff --git a/doc/README.macros b/doc/README.macros
index 86334a4f..6f3a8f50 100644
--- a/doc/README.macros
+++ b/doc/README.macros
@@ -235,6 +235,10 @@ NO_DEBUGGING Removes GC_dump and the debugging routines it calls.
DEBUG_THREADS Turn on printing additional thread-support debugging
information.
+GC_COLLECT_AT_MALLOC=<n> Force garbage collection at every
+ GC_malloc_* call with the size greater than the specified value.
+ (Might be useful for application debugging or in find-leak mode.)
+
JAVA_FINALIZATION Makes it somewhat safer to finalize objects out of
order by specifying a nonstandard finalization mark procedure (see
finalize.c). Objects reachable from finalizable objects will be marked