Sha256: e2517268356e14fc4951aca95fbc5dc293cbfedcf4554757941dacfdc17347d4

Contents?: true

Size: 189 Bytes

Versions: 10

Compression:

Stored size: 189 Bytes

Contents

require 'objspace'

ObjectSpace.trace_object_allocations do
  a = [2,3,5,7,11,13,17,19,23,29,31]
  puts ObjectSpace.allocation_sourcefile(a)
  puts ObjectSpace.allocation_sourceline(a)
end

Version data entries

10 entries across 9 versions & 2 rubygems

Version Path
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/allocation_stats-0.1.5/examples/trace_object_allocations.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/allocation_stats-0.1.5/examples/trace_object_allocations.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/allocation_stats-0.1.5/examples/trace_object_allocations.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/allocation_stats-0.1.5/examples/trace_object_allocations.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/allocation_stats-0.1.5/examples/trace_object_allocations.rb
allocation_stats-0.1.5 examples/trace_object_allocations.rb
allocation_stats-0.1.4 examples/trace_object_allocations.rb
allocation_stats-0.1.3 examples/trace_object_allocations.rb
allocation_stats-0.1.2 examples/trace_object_allocations.rb
allocation_stats-0.1.1 examples/trace_object_allocations.rb