* include/gc_disclaim.h: Add note about all-interior-pointers requirement.
* fnlz_mlc.c (GC_init_finalized_malloc): Abort with a useful message if all
interior pointers are not enabled.
* tests/disclaim_bench.c, tests/disclaim_test.c: Enable all interior
pointers for tests.
GC_API void GC_CALL GC_init_finalized_malloc(void)
{
+ if (!GC_get_all_interior_pointers())
+ ABORT("GC_set_all_interior_pointers(1) is required for finalized "
+ "object allocation.");
+
DCL_LOCK_STATE;
GC_init(); /* In case it's not already done. */
/* Prepare the object kind used by GC_finalized_malloc. Call it from */
/* your initialization code or, at least, at some point before using */
-/* finalized allocations. The function is thread-safe. */
+/* finalized allocations. The function is thread-safe. All interior */
+/* pointers must be enabled (GC_set_all_interior_pointers(1)). */
GC_API void GC_CALL GC_init_finalized_malloc(void);
/* Type of a disclaim call-back, always stored along with closure data */
int model, model_min, model_max;
testobj_t *keep_arr;
+ GC_set_all_interior_pointers(1);
GC_INIT();
GC_init_finalized_malloc();
int i;
#endif
+ GC_set_all_interior_pointers(1);
GC_INIT();
GC_init_finalized_malloc();