mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
b49a870414
This is useful to see what a block of code allocated, e.g. ``` GC.start GC.disable ObjectSpace.trace_object_allocations do # run some code end gc_gen = GC.count allocations = ObjectSpace.dump_all(output: :file, since: gc_gen) GC.enable GC.start retentions = ObjectSpace.dump_all(output: :file, since: gc_gen) ``` |
||
---|---|---|
.. | ||
depend | ||
extconf.rb | ||
object_tracing.c | ||
objspace.c | ||
objspace.h | ||
objspace_dump.c |