6. The heap_dump tool is fantastic for discovering you have a memory leak. 
Sometimes the information it provides is sufficient to fix the problem. 
However, sometimes just knowing the number of objects in the heap is 
insufficient.

I would like a tool that creates an "object reference stack" from the leaf node 
(that leaked) all the way back to its original owner.

e.g.

ruby% ruby reference_stacks dump1 LeakedClass
file7.rb:187 - Array.element 7 # element 7 is an instance of LeakedClass
file7.rb:55 - Hash.key 'a_key' # hash value for this key is the Array from line 
187
file4.rb:21 - Bar#initialize # ivar refers to the hash from file7 line 55

file7.rb:187 - Array.element 6
file7.rb:55 - Hash.key 'another_key'
file4.rb:21 - Bar#initialize

etc.

-- 
--- !ruby/object:MailingList
name: rubinius-dev
view: http://groups.google.com/group/rubinius-dev?hl=en
post: [email protected]
unsubscribe: [email protected]

Reply via email to