lib/memdump/memory_dump.rb
# Remove entries in the reference for which we can't find an object with
# the matching address
#
# @return [(MemoryDump,Set)] the filtered dump and the set of missing addresses found
Remove entries in the reference for which we can't find an object with
the matching address
Remove entries in the reference for which we can ' t find an object with the matching address
def remove_invalid_references
            addresses = self.addresses.to_set
            missing = Set.new
            result = map do |r|
                common = (addresses & r['references'])
                if common.size != r['references'].size
                    missing.merge(r['references'] - common)
                end
                r = r.dup
                r['references'] = common
                r
            end
            return result, missing
        end
def remove_invalid_references addresses = self . addresses . to_set missing = Set . new result = map do | r | common = ( addresses & r [ 'references' ] ) if common . size != r [ 'references' ] . size missing . merge ( r [ 'references' ] - common ) end r = r . dup r [ 'references' ] = common r end return result , missing end
Remove entries in the reference for which we can't find an object with
the matching address
Remove entries in the reference for which we can ' t find an object with the matching address
the filtered dump and the set of missing addresses found
the filtered dump and the set of missing addresses found
(MemoryDump,Set)