+2010-03-26 Ivan Maidanski <ivmai@mail.ru> (really Hans Boehm)
+
+ * alloc.c (GC_maybe_gc): Move GC_notify_full_gc() call upper to
+ be just before GC_clear_marks() call.
+ * include/gc_mark.h (GC_start_callback_proc): Refine the comment.
+
2010-03-23 Ivan Maidanski <ivmai@mail.ru> (really Dave Korn)
* Makefile.am (check_LTLIBRARIES): Initialise to empty.
}
GC_promote_black_lists();
(void)GC_reclaim_all((GC_stop_func)0, TRUE);
+ GC_notify_full_gc();
GC_clear_marks();
n_partial_gcs = 0;
- GC_notify_full_gc();
GC_is_full_gc = TRUE;
} else {
n_partial_gcs++;
/* Set and get the client notifier on collections. The client function */
/* is called at the start of every full GC (called with the allocation */
-/* lock held). May be 0. */
+/* lock held). May be 0. This is a really tricky interface to use */
+/* correctly. Unless you really understand the collector internals, */
+/* the callback should not, directly or indirectly, make any GC_ or */
+/* potentially blocking calls. In particular, it is not safe to */
+/* allocate memory using the garbage collector from within the callback */
+/* function. */
typedef void (GC_CALLBACK * GC_start_callback_proc)(void);
GC_API void GC_CALL GC_set_start_callback(GC_start_callback_proc);
GC_API GC_start_callback_proc GC_CALL GC_get_start_callback(void);