fork(9) download
  1. puts RUBY_VERSION
  2.  
  3. require 'objspace'
  4.  
  5. p ObjectSpace.memsize_of("a"*23)
  6. p ObjectSpace.memsize_of("a"*24)
  7. p ObjectSpace.memsize_of("a".*1000)
  8. h = {"a"=>1, "b"=>2}
  9. p ObjectSpace.memsize_of(h)
Success #stdin #stdout 0.02s 7460KB
stdin
Standard input is empty
stdout
1.9.3
23
24
1000
116