Replace time-based GC with allocation-count trigger, migrate all Create factories to GCList::Create(), fix VFSPath root path, reorder TObject variant

This commit is contained in:
2026-09-02 12:58:47 -05:00
parent c1c3d02bf0
commit c478a3360d

View File

@@ -113,9 +113,8 @@ void GC::Start() {
this->thrd = new Thread([this]() -> void { this->thrd = new Thread([this]() -> void {
while (this->IsRunning()) { while (this->IsRunning()) {
this->BarrierBegin(); this->BarrierBegin();
while (this->allocs < ALLOC_THRESHOLD) while (this->IsRunning() && (this->allocs < ALLOC_THRESHOLD))
this->cond.Wait( this->cond.Wait(&this->mtx);
&this->mtx); // your wrapper around pthread_cond_wait
this->allocs = 0; this->allocs = 0;
std::vector<THeapObject *> to_delete; std::vector<THeapObject *> to_delete;
this->Collect(to_delete); this->Collect(to_delete);