-
Notifications
You must be signed in to change notification settings - Fork 388
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
feat: sync gc #2640
feat: sync gc #2640
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2640 +/- ##
==========================================
- Coverage 54.99% 54.98% -0.01%
==========================================
Files 595 595
Lines 79775 79805 +30
==========================================
+ Hits 43872 43884 +12
- Misses 32581 32598 +17
- Partials 3322 3323 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
I like the simplicity of this approach. It would be good to add some benchmarks to see how this performs against the current implementation, using realms that do allocations of varying size and frequency. Also, if alloc.bytes can now be modified from GC goroutines, should any other reads also be wrapped in atomic.LoadInt64
?
Yes, any operation on This way our allocator is in sync with the allocated and deallocated memory. Also we need to define how much gas this would cost. |
In a meeting with Jae, he didn't like this approach. I'm closing this. |
Use the
runtime.SetFinalizer
api to decrease the counter in the VM allocator when garbage is collected.This is to address this