--- parser3/src/lib/gc/include/gc.h 2020/12/15 13:03:09 1.5 +++ parser3/src/lib/gc/include/gc.h 2025/08/01 17:10:14 1.7 @@ -131,6 +131,10 @@ GC_API GC_PTR GC_realloc GC_PROTO((GC_PT /* Explicitly trigger a full, world-stop collection. */ GC_API void GC_gcollect GC_PROTO((void)); +/* We try to make sure that we allocate at least N/GC_free_space_divisor bytes between collections */ +GC_API void GC_set_free_space_divisor(GC_word); +GC_API GC_word GC_get_free_space_divisor(void); + /* Return the number of bytes in the heap. Excludes collector private */ /* data structures. Includes empty blocks and fragmentation loss. */ /* Includes some pages that were allocated but never written. */ @@ -209,6 +213,11 @@ GC_API void GC_set_warn_proc GC_PROTO((G /* to suppress all warnings (unless statistics printing is turned on). */ GC_API void GC_ignore_warn_proc(char *, GC_word); +/* abort_func is invoked on GC fatal aborts (just before OS-dependent */ +/* abort or exit(1) is called). Must be non-NULL. */ +typedef void (* GC_abort_func)(const char * /* msg */); +GC_API void GC_set_abort_func(GC_abort_func fn); + #ifdef __cplusplus } /* end of extern "C" */ #endif