mirror of
https://github.com/CPunch/Cosmo.git
synced 2026-01-02 22:00:17 +00:00
added cosmoM_addRoot & cosmoM_removeRoot
This commit is contained in:
@@ -32,6 +32,7 @@ typedef struct CState {
|
||||
bool panic;
|
||||
int freezeGC; // when > 0, GC events will be ignored (for internal use)
|
||||
CObj *objects; // tracks all of our allocated objects
|
||||
CObj *userRoots; // user definable roots, this holds CObjs that should be considered "roots", lets the VM know you are holding a reference to a CObj in your code
|
||||
ArrayCObj grayStack; // keeps track of which objects *haven't yet* been traversed in our GC, but *have been* found
|
||||
size_t allocatedBytes;
|
||||
size_t nextGC; // when allocatedBytes reaches this threshhold, trigger a GC event
|
||||
|
||||
Reference in New Issue
Block a user