From 5890cb9d2d9ccd704b07764beba879bb9b97c2c9 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 21 Apr 2014 21:54:17 +0000 Subject: [PATCH] gc.c: full mark after malloc/realloc * gc.c (objspace_malloc_increase): run full mark if 0x04 bit is set in ruby_gc_stress. [ruby-core:62103] [Feature #9761] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 ++++- gc.c | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index edf7cab89e..8a32e1cc89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -Tue Apr 22 06:53:30 2014 Nobuyoshi Nakada +Tue Apr 22 06:54:15 2014 Nobuyoshi Nakada + + * gc.c (objspace_malloc_increase): run full mark if 0x04 bit is + set in ruby_gc_stress. [ruby-core:62103] [Feature #9761] * gc.c (objspace_malloc_increase): run GC after realloc not only malloc and calloc by GC.stress. [ruby-core:62103] [Feature #9761] diff --git a/gc.c b/gc.c index f8bd46e255..2a2be3b06a 100644 --- a/gc.c +++ b/gc.c @@ -5020,9 +5020,13 @@ rb_global_variable(VALUE *var) enum { gc_stress_no_major, gc_stress_no_immediate_sweep, + gc_stress_full_mark_after_malloc, gc_stress_max }; +#define gc_stress_full_mark_after_malloc_p() \ + (FIXNUM_P(ruby_gc_stress) && (FIX2LONG(ruby_gc_stress) & (1<