Project

General

Profile

Bug #9134

RUBY_HEAP_MIN_SLOTS does not work correctly in Ruby 2.0

Added by sam.saffron (Sam Saffron) over 5 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
2.0.0
[ruby-core:58455]

Description

sam@ubuntu:~/Source$ rbenv shell ruby-head
sam@ubuntu:~/Source$ RUBY_HEAP_MIN_SLOTS=$(( 408*1000 )) ruby -e "puts GC.stat[:heap_length]"
1000

sam@ubuntu:~/Source$ rbenv shell 2.0.0-p247
sam@ubuntu:~/Source$ RUBY_HEAP_MIN_SLOTS=$(( 408*1000 )) ruby -e "puts GC.stat[:heap_length]"
1803

RUBY_HEAP_MIN_SLOTS is over committing heap space in 2.0 , this works perfectly fine in Ruby head.


This only affects Ruby 2.0 not Ruby head. The over growth happens on first GC run, it grows the heaps to the correct size, but then quickly grows it again.

Also available in: Atom PDF