diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-13 22:57:41 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-13 22:57:41 +0000 |
commit | e21f9201e008401debe41c02226a14599eb48076 (patch) | |
tree | 545da3945e02e22b954ebe4653f947206f4bf37f /gc.c | |
parent | c9fc391da5d0df3bc63adbab86ad49be3ca1c8e3 (diff) | |
download | ruby-e21f9201e008401debe41c02226a14599eb48076.tar.gz ruby-e21f9201e008401debe41c02226a14599eb48076.tar.xz ruby-e21f9201e008401debe41c02226a14599eb48076.zip |
* gc.c (ruby_initial_gc_stress): defined.
(ruby_initial_gc_stress_ptr): defined.
* debug.c (set_debug_option): use ruby_initial_gc_stress_ptr for
gc_stress option.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -184,8 +184,11 @@ typedef struct rb_objspace { #if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE #define rb_objspace (*GET_VM()->objspace) +static int ruby_initial_gc_stress = 0; +int *ruby_initial_gc_stress_ptr = &ruby_initial_gc_stress; #else static rb_objspace_t rb_objspace = {{GC_MALLOC_LIMIT}, {HEAP_MIN_SLOTS}}; +int *ruby_initial_gc_stress_ptr = &rb_objspace.gc_stress; #endif #define malloc_limit objspace->malloc_params.limit #define malloc_increase objspace->malloc_params.increase @@ -216,6 +219,7 @@ rb_objspace_alloc(void) rb_objspace_t *objspace = malloc(sizeof(rb_objspace_t)); memset(objspace, 0, sizeof(*objspace)); malloc_limit = GC_MALLOC_LIMIT; + ruby_gc_stress = ruby_initial_gc_stress; return objspace; } |