4 ms·
Visualizing memory leaks in Ruby
- throwaway54-762 14y agoA better title might be "visualizing the object-reference graph in Ruby;" debugging memory leaks is a neat side effect. That being said, it's an interesting little project.
- ptolts 14y agoInteresting project. Ruby memory leaks really are brutal!
- gngeal 14y agoAn unfortunate header, innit? One wonders whether to parse it as "(Visualizing memory leaks) in Ruby" or as "Visualizing (memory leaks in Ruby)".
- jfarmer 14y agoIn this case both are true, no? :)
- VeejayRampay 14y agoGreat project. I hope the community can make good use of this to make sure the different libraries and gems and pieces of code leak as much memory as possible. Thank you for putting the work in and making Ruby better.
- blacksmith_tb 14y agoDid you mean "leak as little memory as possible"? Though, some days it seems like the opposite, I admit...
- hobs 14y agoNo, he did not, this is what is commonly referred to as a joke.
- markov_twain 14y agoI randomly stumbled across this gist by tenderlove https://gist.github.com/tenderlove/4576780 https://gist.github.com/tenderlove/4576780 that displays references as a tree view using d3.js. I think that this gist in particular is pointing out a bug in that the "references" for Fixnums (also Symbols) in an array aren't returned by ObjectSpace.find_references.
- petercooper 14y agoRuby 2.0 has a similar feature built in, although round the other way: ObjectSpace.reachable_objects_from(obj) .. coupled with ObjectSpace.memsize_of() this can be used to do some memory leak analysis. We also get GC.stat[:total_allocated_object] and GC.stat[:total_freed_object]