mirror of
https://codeberg.org/andyscott/marCsweep.git
synced 2024-12-22 09:43:12 -05:00
18 lines
404 B
C
18 lines
404 B
C
#ifndef GC_H
|
|
#define GC_H
|
|
|
|
#include "vm.h"
|
|
|
|
// Marks a single reference if it is still in use
|
|
void mark(struct garbageObject *obj);
|
|
|
|
// Marks all references that are still in use
|
|
void markAll(struct virtualMachine *vm);
|
|
|
|
// Deletes references that are no longer in use
|
|
void sweep(struct virtualMachine *vm);
|
|
|
|
// Marks and Sweeps all references
|
|
void collect(struct virtualMachine *vm);
|
|
|
|
#endif /* GC_H */
|