Skip to content
  • nagachika's avatar
    a215c6d0
    partially merge revision(s)... · a215c6d0
    nagachika authored
    
    partially merge revision(s) 119697f6,4a627dbd: [Backport #18014]
    
    	[Bug #18014] Fix rb_gc_force_recycle unmark before sweep
    
    	If we force recycle an object before the page is swept, we should clear
    	it in the mark bitmap. If we don't clear it in the bitmap, then during
    	sweeping we won't account for this free slot so the `free_slots` count
    	of the page will be incorrect.
    	---
    	 gc.c | 2 +-
    	 1 file changed, 1 insertion(+), 1 deletion(-)
    
    	[Bug #18014] Fix memory leak in GC when using Ractors
    
    	When a Ractor is removed, the freelist in the Ractor cache is not
    	returned to the GC, leaving the freelist permanently lost. This commit
    	recycles the freelist when the Ractor is destroyed, preventing a memory
    	leak from occurring.
    	---
    	 gc.c          | 116 +++++++++++++++++++++++++++-------------------------------
    	 internal/gc.h |   6 +++
    	 ractor.c      |   3 ++
    	 ractor_core.h |   5 +--
    	 4 files changed, 64 insertions(+), 66 deletions(-)
    
    Co-authored-by: default avatarPeter Zhu <peter@peterzhu.ca>
    a215c6d0
    partially merge revision(s)...
    nagachika authored
    
    partially merge revision(s) 119697f6,4a627dbd: [Backport #18014]
    
    	[Bug #18014] Fix rb_gc_force_recycle unmark before sweep
    
    	If we force recycle an object before the page is swept, we should clear
    	it in the mark bitmap. If we don't clear it in the bitmap, then during
    	sweeping we won't account for this free slot so the `free_slots` count
    	of the page will be incorrect.
    	---
    	 gc.c | 2 +-
    	 1 file changed, 1 insertion(+), 1 deletion(-)
    
    	[Bug #18014] Fix memory leak in GC when using Ractors
    
    	When a Ractor is removed, the freelist in the Ractor cache is not
    	returned to the GC, leaving the freelist permanently lost. This commit
    	recycles the freelist when the Ractor is destroyed, preventing a memory
    	leak from occurring.
    	---
    	 gc.c          | 116 +++++++++++++++++++++++++++-------------------------------
    	 internal/gc.h |   6 +++
    	 ractor.c      |   3 ++
    	 ractor_core.h |   5 +--
    	 4 files changed, 64 insertions(+), 66 deletions(-)
    
    Co-authored-by: default avatarPeter Zhu <peter@peterzhu.ca>
Loading