Skip to content
  • NARUSE, Yui's avatar
    6a8fcb50
    merge revision(s) 3be2acfa: [Backport #19327] · 6a8fcb50
    NARUSE, Yui authored
    	Fix re-embedding of strings during compaction
    
    	The reference updating code for strings is not re-embedding strings
    	because the code is incorrectly wrapped inside of a
    	`if (STR_SHARED_P(obj))` clause. Shared strings can't be re-embedded
    	so this ends up being a no-op. This means that strings can be moved to a
    	large size pool during compaction, but won't be re-embedded, which would
    	waste the space.
    	---
    	 gc.c                         | 16 +++++++++-------
    	 string.c                     | 12 ++++++++----
    	 test/ruby/test_gc_compact.rb |  8 ++++----
    	 3 files changed, 21 insertions(+), 15 deletions(-)
    6a8fcb50
    merge revision(s) 3be2acfa: [Backport #19327]
    NARUSE, Yui authored
    	Fix re-embedding of strings during compaction
    
    	The reference updating code for strings is not re-embedding strings
    	because the code is incorrectly wrapped inside of a
    	`if (STR_SHARED_P(obj))` clause. Shared strings can't be re-embedded
    	so this ends up being a no-op. This means that strings can be moved to a
    	large size pool during compaction, but won't be re-embedded, which would
    	waste the space.
    	---
    	 gc.c                         | 16 +++++++++-------
    	 string.c                     | 12 ++++++++----
    	 test/ruby/test_gc_compact.rb |  8 ++++----
    	 3 files changed, 21 insertions(+), 15 deletions(-)
Loading