* gc.c (rb_objspace::gc_stress): int -> VALUE to store Fixnum object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2013-06-18 22:45:41 +00:00
Родитель d879849b6e
Коммит bfac961bed
2 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -1,3 +1,7 @@
Wed Jun 19 07:44:31 2013 Koichi Sasada <ko1@atdot.net>
* gc.c (rb_objspace::gc_stress): int -> VALUE to store Fixnum object.
Wed Jun 19 07:25:35 2013 Koichi Sasada <ko1@atdot.net>
* gc.c (make_deferred): clear flags to T_ZOMBIE.

6
gc.c
Просмотреть файл

@ -89,7 +89,7 @@ typedef struct {
unsigned int initial_free_min;
double initial_growth_factor;
#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE
int gc_stress;
VALUE gc_stress;
#endif
} ruby_gc_params_t;
@ -362,7 +362,7 @@ typedef struct rb_objspace {
size_t total_allocated_object_num;
size_t total_freed_object_num;
rb_event_flag_t hook_events; /* this place may be affinity with memory cache */
int gc_stress;
VALUE gc_stress;
struct mark_func_data_struct {
void *data;
@ -388,7 +388,7 @@ typedef struct rb_objspace {
#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE
#define rb_objspace (*GET_VM()->objspace)
#define ruby_initial_gc_stress initial_params.gc_stress
int *ruby_initial_gc_stress_ptr = &ruby_initial_gc_stress;
VALUE *ruby_initial_gc_stress_ptr = &ruby_initial_gc_stress;
#else
static rb_objspace_t rb_objspace = {{GC_MALLOC_LIMIT}};
int *ruby_initial_gc_stress_ptr = &rb_objspace.gc_stress;