Sha256: e581534e1cf057cc06172c0171040119ace93e9b3d4da33d38614b382dd79a4a
Contents?: true
Size: 453 Bytes
Versions: 2
Compression:
Stored size: 453 Bytes
Contents
module MemDump def self.cleanup_references(dump) addresses = Set.new records = Array.new dump.each_record do |r| addr = (r['address'] || r['root']) addresses << addr records << r end records.each do |r| if references = r['references'] references.delete_if { |r| !addresses.include?(r) } end end records end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
memdump-0.2.0 | lib/memdump/cleanup_references.rb |
memdump-0.1.0 | lib/memdump/cleanup_references.rb |