-
Notifications
You must be signed in to change notification settings - Fork 2
Tri Color GC Implementation #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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!)
- if write barrier is triggered, move the white object to grey (save to be greyed)
- if memory is full, trigger GC (depending on flag, trigger tricolour vs pre-existing GC)
- otherwise, concurrently run tricolour GC
- Initiate: collect roots and mark grey
- Mark: pop from grey, mark its children as grey
- Mark: mark objects from save_stack as grey
- 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intended?
No description provided.