• Ruby 的内存陷阱 at 2015年05月31日

    那么问题来啦,what's the condition for Ruby to shrink the heap?看来还是要看实现啊

  • Ruby 的内存陷阱 at 2015年05月31日

    然后又在网上查了下:Disclaimer, Ruby GC does have the code to shrink the heap. I have yet to see that happen in reality because the conditions for heap to shrink rarely happen in production applications. https://www.airpair.com/ruby-on-rails/performance

  • Ruby 的内存陷阱 at 2015年05月31日

    楼主的意思是说 RVALUE 使用的 waterMark 增加会导致 heap 增加,但是 waterMark 下降,heap 确不会收缩吗?个人感觉就是时间的问题,稍微等一段时间不生成大量的 object 应该会自动收缩吧,毕竟 heap 生成的成本也比较大,而且 heap 的使用也是很难预测的。有对 Ruby 实现比较熟悉的同学出来回答下?