diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-06 09:38:22 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-06 09:38:22 +0000 |
commit | e4720e1118d71f3a5eae8015cc4bf431e30730e7 (patch) | |
tree | 9821f723e33003c9ddb4312cc09870b6c3cb291b | |
parent | 2c616737e514faed0e9a7be0e097e3091334277b (diff) | |
download | ruby-e4720e1118d71f3a5eae8015cc4bf431e30730e7.tar.gz |
* gc.c (rb_objspace_alloc, Init_heap): initialize
oldmalloc_increase_limit at Init_heap.
rb_objspace_alloc() is not called on some platforms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | gc.c | 7 |
2 files changed, 11 insertions, 3 deletions
@@ -1,3 +1,10 @@ +Fri Dec 6 18:37:11 2013 Koichi Sasada <ko1@atdot.net> + + * gc.c (rb_objspace_alloc, Init_heap): initialize + oldmalloc_increase_limit at Init_heap. + + rb_objspace_alloc() is not called on some platforms. + Fri Dec 6 18:33:39 2013 Koichi Sasada <ko1@atdot.net> * gc.c (garbage_collect_body): bug fix. @@ -867,9 +867,6 @@ rb_objspace_alloc(void) ruby_gc_stress = ruby_initial_gc_stress; malloc_limit = gc_params.malloc_limit_min; -#if RGENGC_ESTIMATE_OLDMALLOC - objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_min; -#endif return objspace; } @@ -1649,6 +1646,10 @@ Init_heap(void) { rb_objspace_t *objspace = &rb_objspace; +#if RGENGC_ESTIMATE_OLDMALLOC + objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_min; +#endif + heap_add_pages(objspace, heap_eden, gc_params.heap_init_slots / HEAP_OBJ_LIMIT); init_mark_stack(&objspace->mark_stack); |