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

Separate String/Array/MatchData optimisations from MMTk-specific code #71

Open
wks opened this issue Jun 18, 2024 · 0 comments
Open

Separate String/Array/MatchData optimisations from MMTk-specific code #71

wks opened this issue Jun 18, 2024 · 0 comments

Comments

@wks
Copy link

wks commented Jun 18, 2024

One crucial part of making CRuby perform well with MMTk is making String, Array and MatchData not rely on obj_free to free its underlying buffers allocated by xmalloc. We introduced imemo:mmtk_strbuf and imemo:mmtk_objbuf as alternatives that are allocated in the GC heap. In theory, those changes only needs the GC to be able to allocate objects of any sizes, and the GC doesn't have to be MMTk.

It will be helpful to guard those code using special macros (and run-time checking variable, too, if we want them to be enabled/disabled at run time) instead of guarding them using #if USE_MMTK and/or rb_mmtk_enabled_p(). This will also make it possible to push those changes to the upstream once CRuby introduces arbitrary-size allocation.

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

No branches or pull requests

1 participant