4 KRK_Function(collect) {
11 FUNCTION_TAKES_NONE();
12 vm.globalFlags |= (KRK_GLOBAL_GC_PAUSED);
16 KRK_Function(resume) {
17 FUNCTION_TAKES_NONE();
18 vm.globalFlags &= ~(KRK_GLOBAL_GC_PAUSED);
23 KRK_DOC(module,
"@brief Namespace containing methods for controlling the garbage collector.");
25 KRK_DOC(BIND_FUNC(module,collect),
26 "@brief Triggers one cycle of garbage collection.");
27 KRK_DOC(BIND_FUNC(module,pause),
28 "@brief Disables automatic garbage collection until @ref resume is called.");
29 KRK_DOC(BIND_FUNC(module,resume),
30 "@brief Re-enable automatic garbage collection after it was stopped by @ref pause ");
KrkValue krk_runtimeError(KrkClass *type, const char *fmt,...)
Produce and raise an exception with a formatted message.
size_t krk_collectGarbage(void)
Run a cycle of the garbage collector.
Utilities for creating native bindings.
#define KRK_DOC(thing, text)
Attach documentation to a thing of various types.
Core API for the bytecode virtual machine.
krk_threadLocal KrkThreadState krk_currentThread
Thread-local VM state.
#define vm
Convenience macro for namespacing.