1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-08 09:16:00 +02:00

Fixed GC race condition starting an autodelete thread

This commit is contained in:
Brian Fiete 2020-08-31 11:29:11 -07:00
parent 43660fb633
commit b3354ee635
5 changed files with 39 additions and 7 deletions

View file

@ -199,7 +199,7 @@ public:
bool WantsSuspend();
void CalcStackStart();
};
struct RawLeakInfo
{
bf::System::DbgRawAllocData* mRawAllocData;
@ -324,6 +324,7 @@ public:
int mCurPendingGCSize;
int mMaxPendingGCSize;
Beefy::Array<ThreadInfo*> mThreadList;
Beefy::Dictionary<BfpThreadId, BfInternalThread*> mPendingThreads;
int mCurMutatorMarkCount;
int mCurGCMarkCount;
int mCurGCObjectQueuedCount;
@ -390,6 +391,7 @@ public:
void StopCollecting();
void AddStackMarkableObject(bf::System::Object* obj);
void RemoveStackMarkableObject(bf::System::Object* obj);
void AddPendingThread(BfInternalThread* internalThread);
void Shutdown();
void InitDebugDump();
void EndDebugDump();
@ -463,6 +465,7 @@ namespace bf
BFRT_EXPORT static void StopCollecting();
BFRT_EXPORT static void AddStackMarkableObject(Object* obj);
BFRT_EXPORT static void RemoveStackMarkableObject(Object* obj);
BFRT_EXPORT static void AddPendingThread(void* internalThreadInfo);
public:
BFRT_EXPORT static void Shutdown();
@ -483,7 +486,7 @@ namespace bf
BFRT_EXPORT static void SetAutoCollectPeriod(intptr periodMS);
BFRT_EXPORT static void SetCollectFreeThreshold(intptr freeBytes);
BFRT_EXPORT static void SetMaxPausePercentage(intptr maxPausePercentage);
BFRT_EXPORT static void SetMaxRawDeferredObjectFreePercentage(intptr maxPercentage);
BFRT_EXPORT static void SetMaxRawDeferredObjectFreePercentage(intptr maxPercentage);
};
}
}