Method: Memory::Wrapper#initialize
- Defined in:
- lib/memory/sampler.rb
#initialize(cache) ⇒ Wrapper
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/memory/sampler.rb', line 29 def initialize(cache) super() @cache = cache self.register_type(0x01, Allocation, packer: ->(instance){self.pack(instance.pack)}, unpacker: ->(data){Allocation.unpack(@cache, self.unpack(data))}, ) self.register_type(0x02, Symbol) end |