diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-31 09:16:48 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-31 09:16:48 +0000 |
commit | 867693fe3d803486e8571d024169ed5c2a251662 (patch) | |
tree | 58828bede2b47aa30a67b2a04b9f4128cf40e735 /ChangeLog | |
parent | 9bb740d2eca29e590275ef97dbd3c5bd26acb2f1 (diff) | |
download | ruby-867693fe3d803486e8571d024169ed5c2a251662.tar.gz |
* gc.c: change additional allocation policy.
Introduce new environement variable
GC_HEAP_FREE_SLOTS_GOAL_RATIO (goal_ratio) to calculate the ratio
of additional memory.
Before this change, we add pages with the following formula
(when free_slots < total_pages * RUBY_GC_HEAP_FREE_SLOTS_MIN_RATIO):
next_pages = total_pages * RUBY_GC_HEAP_GROWTH_FACTOR
This addition can allocate too much.
With this change, we increase pages to satisfy the following formula:
next_free_slots = next_total_slots * goal_ratio
where
next_free_slots = free_slots + adding_slots
next_total_slots = total_slots + adding_slots.
If you want to prepare many free slots, increase this ratio.
If this variable is 0, then simply multiply
RUBY_GC_HEAP_GROWTH_FACTOR.
* gc.c (get_envparam_double): enable to accept 0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -1,3 +1,30 @@ +Thu Mar 31 17:50:27 2016 Koichi Sasada <ko1@atdot.net> + + * gc.c: change additional allocation policy. + + Introduce new environement variable + GC_HEAP_FREE_SLOTS_GOAL_RATIO (goal_ratio) to calculate the ratio + of additional memory. + + Before this change, we add pages with the following formula + (when free_slots < total_pages * RUBY_GC_HEAP_FREE_SLOTS_MIN_RATIO): + next_pages = total_pages * RUBY_GC_HEAP_GROWTH_FACTOR + + This addition can allocate too much. + + With this change, we increase pages to satisfy the following formula: + next_free_slots = next_total_slots * goal_ratio + where + next_free_slots = free_slots + adding_slots + next_total_slots = total_slots + adding_slots. + + If you want to prepare many free slots, increase this ratio. + + If this variable is 0, then simply multiply + RUBY_GC_HEAP_GROWTH_FACTOR. + + * gc.c (get_envparam_double): enable to accept 0. + Thu Mar 31 17:48:25 2016 Koichi Sasada <ko1@atdot.net> * gc.c (gc_marks_finish): fix syntax error. |