Top posts

Every blog post that took off on Hacker News, ranked by the votes of its best submission. 81,166 posts.

Any topic
Any year
59402

Visualizing Your Ruby Heap

In a previous post, I wrote a bit about how Ruby objects are laid out in memory. Today we’ll use that information to write a program that will allow us to take a Ruby heap dump and visualize the layout and fragmentation of that heap. Ruby Object Layout Recap Just as a recap, Ruby objects are fixed width. That is…