Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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", ... }
- Loading branch information