* include/gc.h (GC_incremental_protection_needs): Improve comment.
* os_dep.c (GC_incremental_protection_needs): Add assertion on GC is
initialized.
#define GC_PROTECTS_STACK 8 /* Probably impractical. */
#define GC_PROTECTS_NONE 0
+/* The collector is assumed to be initialized before this call. */
GC_API int GC_CALL GC_incremental_protection_needs(void);
/* Perform some garbage collection work, if appropriate. */
GC_API int GC_CALL GC_incremental_protection_needs(void)
{
+ GC_ASSERT(GC_is_initialized);
+
if (GC_page_size == HBLKSIZE) {
return GC_PROTECTS_POINTER_HEAP;
} else {