Skip to content

Conversation

@Originalidk
Copy link

No description provided.

@Originalidk Originalidk self-assigned this Oct 23, 2025
Copy link

@jonasongg jonasongg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! the logic looks correct to my limited understanding of a tricolour GC (correct me if I'm wrong!)

  1. if write barrier is triggered, move the white object to grey (save to be greyed)
  2. if memory is full, trigger GC (depending on flag, trigger tricolour vs pre-existing GC)
  3. otherwise, concurrently run tricolour GC
    1. Initiate: collect roots and mark grey
    2. Mark: pop from grey, mark its children as grey
    3. Mark: mark objects from save_stack as grey
    4. Sweep: once grey is empty, free white objects, and make black objects white for next cycle

great that you've added a profiler as well to measure GC performance :)

}

list() {
if (this.addr >= 256) console.log(this)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intended?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants