U:RDoc::AnyMethod[iI"trace_object_allocations:ETI"*ObjectSpace::trace_object_allocations;TT: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"MStarts tracing object allocations from the ObjectSpace extension module.;To:RDoc::Markup::BlankLineo; ; [I"For example:;T@o:RDoc::Markup::Verbatim; [I"require 'objspace' ;TI" ;TI" class C ;TI" include ObjectSpace ;TI" ;TI" def foo ;TI"% trace_object_allocations do ;TI" obj = Object.new ;TI"K p "#{allocation_sourcefile(obj)}:#{allocation_sourceline(obj)}" ;TI" end ;TI" end ;TI" end ;TI" ;TI"#C.new.foo #=> "objtrace.rb:8" ;T: @format0o; ; [I"QThis example has included the ObjectSpace module to make it easier to read, ;TI"Pbut you can also use the ::trace_object_allocations notation (recommended).;T@o; ; [I"LNote that this feature introduces a huge performance decrease and huge ;TI"memory consumption.;T: @fileI""ext/objspace/object_tracing.c;T:0@omit_headings_from_table_of_contents_below0I"(trace_object_allocations { block } ;T0[I"();T@*FI"ObjectSpace;TcRDoc::NormalModule00