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

Allow symbols used for scopes to move #10550

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 16, 2024

  1. Allow symbols used for scopes to move

    This commit allows symbols used for instance variables, global variables,
    constants, class names to be moved by GC compaction.
    
    For example:
    
        require "objspace"
    
        Object.const_set("Hello".to_sym, 1)
        sym = "Hello".to_sym
    
        puts ObjectSpace.dump(sym)
        GC.verify_compaction_references(expand_heap: true, toward: :empty)
        puts ObjectSpace.dump(sym)
    
    Before:
    
        {"address":"0x101274ac8", "type":"SYMBOL", ... }
        {"address":"0x101274ac8", "type":"SYMBOL", ... }
    
    After:
    
        {"address":"0x101544a78", "type":"SYMBOL", ... }
        {"address":"0x1015d7f80", "type":"SYMBOL", ... }
    peterzhu2118 committed Apr 16, 2024
    Configuration menu
    Copy the full SHA
    764d019 View commit details
    Browse the repository at this point in the history