Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Visualizing Garbage Collection in Rubinius, JRu...

Visualizing Garbage Collection in Rubinius, JRuby and Ruby 2.0

In this talk we’ll dive into Ruby internals and take a close look at an ugly topic: garbage collection. How do these Ruby VM’s allocate memory for new objects? How do they identify unused objects? How do they reclaim memory from garbage objects, allowing it to be used again?

You can learn a lot about someone from their garbage. Using a series of diagrams, we’ll visually compare and contrast the complex algorithms these very different Ruby implementations use. What computer science research is behind each garbage collector? We’ll also look at the GC changes planned for the upcoming Ruby 2.1 release.

Pat Shaughnessy

November 09, 2013
Tweet

More Decks by Pat Shaughnessy

Other Decks in Programming

Transcript

  1. class Node def initialize(val) @value = val end end p

    Node.new(1) => #<Node:0x007fc72a17e5f0 @value=1> p Node.new(2) => #<Node:0x007fc72a17e4b0 @value=2>
  2. n1 = Node.new("More than 23 chars here...") n1 next (RubyObject)

    Node (RubyClass) (RubyString) "More than 23 chars here..." (ByteArray)