diff options
Diffstat (limited to 'boehm-gc/finalize.c')
-rw-r--r-- | boehm-gc/finalize.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/boehm-gc/finalize.c b/boehm-gc/finalize.c index 2ee927f..1ab56ce 100644 --- a/boehm-gc/finalize.c +++ b/boehm-gc/finalize.c @@ -694,6 +694,14 @@ GC_API void GC_finalize_all() } #endif +/* Returns true if it is worth calling GC_invoke_finalizers. (Useful if */ +/* finalizers can only be called from some kind of `safe state' and */ +/* getting into that safe state is expensive.) */ +int GC_should_invoke_finalizers GC_PROTO((void)) +{ + return GC_finalize_now != 0; +} + /* Invoke finalizers for all objects that are ready to be finalized. */ /* Should be called without allocation lock. */ int GC_invoke_finalizers() |