Thanks to visit codestin.com
Credit goes to github.com

Skip to content

YJIT: call free_block to cleanup block when out of memory #6551

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

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

XrXr
Copy link
Member

@XrXr XrXr commented Oct 14, 2022

The commented out instance of free_block() is left over from the port. The addition in gen_single_block() was a place we missed. The new block is allocated in the same function and could have invariants associated with it even though there is no space to hold all the code.


@k0kubun and I uncovered these while lowering YJIT's memory limit to test code GC.
Unfortunately, some fixes for OOM from #6460 is also required to test this, but I confirmed that the two changes help with railsbench with a 1M limit and hexapdf with a 2M limit respectively (yjit-bench workloads).

The commented out instance of free_block() is left over from the port.
The addition in gen_single_block() was a place we missed. The new block
is allocated in the same function and could have invariants associated
with it even though there is no space to hold all the code.
@matzbot matzbot requested a review from a team October 14, 2022 21:34
Copy link
Member

@k0kubun k0kubun left a comment

Choose a reason for hiding this comment

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

Thanks!

@XrXr XrXr merged commit ad3d210 into ruby:master Oct 17, 2022
@XrXr XrXr deleted the yjit-oom branch October 17, 2022 16:11
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.

3 participants