Skip to content
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

Investigate other API models for our GC #2631

Open
jedel1043 opened this issue Mar 4, 2023 · 1 comment
Open

Investigate other API models for our GC #2631

jedel1043 opened this issue Mar 4, 2023 · 1 comment
Labels
API enhancement New feature or request gc Issue related to garbage collection performance Performance related changes and issues

Comments

@jedel1043
Copy link
Member

jedel1043 commented Mar 4, 2023

Our current GC API uses a lot of reference counting to track the number of roots for an object, but this is necessary by our current API. It would be good to check out some other APIs to see how they handle garbage collection:

Our ideal API:

  • Disallows sharing JsValues between Contexts in the same thread.
  • Makes it really easy to root and unroot values, while being 100% safe to human error.
  • Has compatibility with all GC algorithms, including compaction.
  • Allows having concurrent and/or parallel garbage collectors.
  • Snapshotting support
@jedel1043 jedel1043 added enhancement New feature or request performance Performance related changes and issues API gc Issue related to garbage collection labels Mar 4, 2023
@jedel1043 jedel1043 pinned this issue Jun 12, 2024
@jasonwilliams
Copy link
Member

jasonwilliams commented Jun 13, 2024

It may also be worth taking future proposals like https://github.com/tc39/proposal-structs into account when thinkin about "shared heaps" which can be accessed from multiple realms and how we GC that data once unreachable.

there’s also some requirements in this thread #1372

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API enhancement New feature or request gc Issue related to garbage collection performance Performance related changes and issues
Projects
None yet
Development

No branches or pull requests

2 participants