Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby27
/
share
/
ri
/
system
/
ObjectSpace
/
//opt/alt/ruby27/share/ri/system/ObjectSpace/trace_object_allocations-c.ri
U:RDoc::AnyMethod[iI"trace_object_allocations:ETI"*ObjectSpace::trace_object_allocations;TT:privateo:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"MStarts tracing object allocations from the ObjectSpace extension module.;To:RDoc::Markup::BlankLine o; ; [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