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

Stop infinite object allocation to get rid of OOM killer #4697

Merged
merged 1 commit into from Aug 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions test/ruby/test_gc_compact.rb
Expand Up @@ -69,10 +69,11 @@ def test_implicit_compaction_does_something
}
count = GC.stat :compact_count
GC.auto_compact = true
loop do
n = 1_000_000
n.times do
break if count < GC.stat(:compact_count)
list2 << Object.new
end
end and skip "implicit compaction didn't happen within #{n} objects"
compact_stats = GC.latest_compact_info
refute_predicate compact_stats[:considered], :empty?
refute_predicate compact_stats[:moved], :empty?
Expand Down