class HeapInfo::TcacheEntry

A tcache entry.

Though this class inherited from {Chunk} ({Fastbin}), tcache entries are not chunks.

Public Instance Methods

inspect() click to toggle source

For pretty inspect.

@return [String]

Empty string is returned if this entry contains nothing.
Calls superclass method HeapInfo::Fastbin#inspect
# File lib/heapinfo/tcache.rb, line 43
def inspect
  return '' if fd_of(@base).zero? # empty
  super
end

Private Instance Methods

fd_of(ptr) click to toggle source

Hack fd_of method here then everything works.

# File lib/heapinfo/tcache.rb, line 51
def fd_of(ptr)
  addr_of(ptr, 0)
end