+ }
+#endif /* !NO_DEBUGGING */
+
+/* Getter functions for the public Read-only variables. */
+
+/* GC_get_gc_no() is unsynchronized and should be typically called */
+/* inside the context of GC_call_with_alloc_lock() to prevent data */
+/* races (on multiprocessors). */
+GC_API GC_word GC_CALL GC_get_gc_no(void)
+{
+ return GC_gc_no;
+}
+
+GC_API int GC_CALL GC_get_parallel(void)
+{
+ /* GC_parallel is initialized at start-up. */
+ return GC_parallel;
+}
+
+/* Setter and getter functions for the public R/W function variables. */
+/* These functions are synchronized (like GC_set_warn_proc() and */
+/* GC_get_warn_proc()). */
+
+GC_API void GC_CALL GC_set_oom_fn(GC_oom_func fn)
+{
+ GC_ASSERT(fn != 0);
+ LOCK();
+ GC_oom_fn = fn;
+ UNLOCK();
+}
+
+GC_API GC_oom_func GC_CALL GC_get_oom_fn(void)
+{
+ GC_oom_func fn;
+ LOCK();
+ fn = GC_oom_fn;
+ UNLOCK();
+ return fn;
+}
+
+GC_API void GC_CALL GC_set_finalizer_notifier(GC_finalizer_notifier_proc fn)
+{
+ /* fn may be 0 (means no finalizer notifier). */
+ LOCK();
+ GC_finalizer_notifier = fn;
+ UNLOCK();
+}
+
+GC_API GC_finalizer_notifier_proc GC_CALL GC_get_finalizer_notifier(void)
+{
+ GC_finalizer_notifier_proc fn;
+ LOCK();
+ fn = GC_finalizer_notifier;
+ UNLOCK();
+ return fn;
+}
+
+/* Setter and getter functions for the public numeric R/W variables. */
+/* It is safe to call these functions even before GC_INIT(). */
+/* These functions are unsynchronized and should be typically called */
+/* inside the context of GC_call_with_alloc_lock() (if called after */
+/* GC_INIT()) to prevent data races (unless it is guaranteed the */
+/* collector is not multi-threaded at that execution point). */
+
+GC_API void GC_CALL GC_set_find_leak(int value)
+{
+ /* value is of boolean type. */
+ GC_find_leak = value;
+}
+
+GC_API int GC_CALL GC_get_find_leak(void)
+{
+ return GC_find_leak;
+}
+
+GC_API void GC_CALL GC_set_all_interior_pointers(int value)
+{
+ GC_ASSERT(!GC_is_initialized || value == GC_all_interior_pointers);
+ GC_ASSERT(value == 0 || value == 1);
+ GC_all_interior_pointers = value;
+}
+
+GC_API int GC_CALL GC_get_all_interior_pointers(void)
+{
+ return GC_all_interior_pointers;
+}
+
+GC_API void GC_CALL GC_set_finalize_on_demand(int value)
+{
+ GC_ASSERT(value != -1);
+ /* value is of boolean type. */
+ GC_finalize_on_demand = value;
+}
+
+GC_API int GC_CALL GC_get_finalize_on_demand(void)
+{
+ return GC_finalize_on_demand;
+}
+
+GC_API void GC_CALL GC_set_java_finalization(int value)
+{
+ GC_ASSERT(value != -1);
+ /* value is of boolean type. */
+ GC_java_finalization = value;
+}
+
+GC_API int GC_CALL GC_get_java_finalization(void)
+{
+ return GC_java_finalization;
+}
+
+GC_API void GC_CALL GC_set_dont_expand(int value)
+{
+ GC_ASSERT(value != -1);
+ /* value is of boolean type. */
+ GC_dont_expand = value;
+}
+
+GC_API int GC_CALL GC_get_dont_expand(void)
+{
+ return GC_dont_expand;
+}
+
+GC_API void GC_CALL GC_set_no_dls(int value)
+{
+ GC_ASSERT(value != -1);
+ /* value is of boolean type. */
+ GC_no_dls = value;