int mark_unconditionally)
{
GC_ASSERT((unsigned)kind < MAXOBJKINDS);
+ GC_ASSERT(NONNULL_ARG_NOT_NULL(proc));
GC_obj_kinds[kind].ok_disclaim_proc = proc;
GC_obj_kinds[kind].ok_mark_unconditionally = (GC_bool)mark_unconditionally;
}
word *op;
GC_ASSERT(GC_finalized_kind != 0);
+ GC_ASSERT(NONNULL_ARG_NOT_NULL(fclos));
+ GC_ASSERT(((word)fclos & FINALIZER_CLOSURE_FLAG) == 0);
op = (word *)GC_malloc_kind(SIZET_SAT_ADD(lb, sizeof(word)),
GC_finalized_kind);
if (EXPECT(NULL == op, FALSE))
/* but at the expense that long chains of objects will take many cycles */
/* to reclaim. */
GC_API void GC_CALL GC_register_disclaim_proc(int /*kind*/,
- GC_disclaim_proc /*proc*/,
- int /*mark_from_all*/);
+ GC_disclaim_proc /*proc*/,
+ int /*mark_from_all*/) GC_ATTR_NONNULL(2);
/* The finalizer closure used by GC_finalized_malloc. */
struct GC_finalizer_closure {
/* result points to a word prior to the start of the allocated object. */
GC_API GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1) void * GC_CALL
GC_finalized_malloc(size_t /*size*/,
- const struct GC_finalizer_closure * /*fc*/);
+ const struct GC_finalizer_closure * /*fc*/) GC_ATTR_NONNULL(2);
#ifdef __cplusplus
} /* extern "C" */