Skip to content

Commit

Permalink
Verify compaction references
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Oct 13, 2021
1 parent e3a4093 commit 8bdb729
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/openssl/utils.rb
Expand Up @@ -29,6 +29,12 @@
end
end

if GC.respond_to?(:verify_compaction_references)
# This method was added in Ruby 3.0.0. Calling it this way asks the GC to
# move objects around, helping to find object movement bugs.
GC.verify_compaction_references(double_heap: true, toward: :empty)
end

require "test/unit"
require "tempfile"
require "socket"
Expand Down

0 comments on commit 8bdb729

Please sign in to comment.