ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.-
memsize_of-c.ri 0000644 00000001371 15237023631 0007461 0 ustar 00 U:RDoc::AnyMethod[iI"memsize_of:ETI"ObjectSpace::memsize_of;TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"2Return consuming memory size of obj in bytes.;To:RDoc::Markup::BlankLine o;
; [I"JNote that the return size is incomplete. You need to deal with this ;TI"Oinformation as only a *HINT*. Especially, the size of +T_DATA+ may not be ;TI"
correct.;T@o;
; [I"6This method is only expected to work with C Ruby.;T@o;
; [I"CFrom Ruby 2.2, memsize_of(obj) returns a memory size includes ;TI"sizeof(RVALUE).;T:
@fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I",ObjectSpace.memsize_of(obj) -> Integer
;T0[ I" (p1);T@FI"ObjectSpace;TcRDoc::NormalModule00 cdesc-ObjectSpace.ri 0000644 00000006337 15237023631 0010354 0 ustar 00 U:RDoc::NormalModule[iI"ObjectSpace:ET@0o:RDoc::Markup::Document:@parts[o;;[ :
@fileI"!ext/objspace/lib/objspace.rb;T:0@omit_headings_from_table_of_contents_below0o;;[ ; I""ext/objspace/object_tracing.c;T;
0o;;[
o:RDoc::Markup::Paragraph;[I"JThe objspace library extends the ObjectSpace module and adds several ;TI"9methods to get internal statistic information about ;TI"object/memory management.;To:RDoc::Markup::BlankLine o;;[I"NYou need to require 'objspace' to use this extension module.;T@o;;[ I"EGenerally, you *SHOULD NOT* use this library if you do not know ;TI"Iabout the MRI implementation. Mainly, this library is for (memory) ;TI"Gprofiler developers and MRI developers who need to know about MRI ;TI"memory usage.;T; I"ext/objspace/objspace.c;T;
0o;;[ ; I"!ext/objspace/objspace_dump.c;T;
0o;;[
o;;[I":The ObjectSpace module contains a number of routines ;TI"Ithat interact with the garbage collection facility and allow you to ;TI"2traverse all living objects with an iterator.;T@o;;[
I"QObjectSpace also provides support for object finalizers, procs that will be ;TI"Gcalled when a specific object is about to be destroyed by garbage ;TI"+collection. See the documentation for ;TI"LObjectSpace.define_finalizer for important information on ;TI"&how to use this method correctly.;T@o:RDoc::Markup::Verbatim;[
I"
a = "A"
;TI"
b = "B"
;TI"
;TI"QObjectSpace.define_finalizer(a, proc {|id| puts "Finalizer one on #{id}" })
;TI"QObjectSpace.define_finalizer(b, proc {|id| puts "Finalizer two on #{id}" })
;TI"
;TI"
a = nil
;TI"
b = nil
;T:@format0o;;[I"_produces:_;T@o;
;[I" Finalizer two on 537763470
;TI"Finalizer one on 537763480;T;0; I" gc.c;T;
0o;;[ ; I"
gc.rb;T;
0; 0;
0[ [ [ [[I"
class;T[[:public[ [:protected[ [:private["[I"
_dump;TI"!ext/objspace/objspace_dump.c;T[I"_dump_all;T@W[I"_id2ref;TI" gc.c;T[I"allocation_class_path;TI""ext/objspace/object_tracing.c;T[I"allocation_generation;T@_[I"allocation_method_id;T@_[I"allocation_sourcefile;T@_[I"allocation_sourceline;T@_[I"count_imemo_objects;TI"ext/objspace/objspace.c;T[I"count_nodes;T@j[I"count_objects;T@\[I"count_objects_size;T@j[I"count_symbols;T@j[I"count_tdata_objects;T@j[I"define_finalizer;T@\[I"each_object;T@\[I"garbage_collect;TI"
gc.rb;T[I"internal_class_of;T@j[I"internal_super_of;T@j[I"memsize_of;T@j[I"memsize_of_all;T@j[I"reachable_objects_from;T@j[I" reachable_objects_from_root;T@j[I"trace_object_allocations;T@_[I"#trace_object_allocations_clear;T@_[I")trace_object_allocations_debug_start;T@_[I"#trace_object_allocations_start;T@_[I""trace_object_allocations_stop;T@_[I"undefine_finalizer;T@\[I"
instance;T[[;[ [;[ [;[[I" dump;TI"!ext/objspace/lib/objspace.rb;T[I"
dump_all;T@š[@z@{[ [U:RDoc::Context::Section[i 0o;;[ ; 0;
0[I"!ext/objspace/lib/objspace.rb;TI""ext/objspace/object_tracing.c;TI"ext/objspace/objspace.c;TI"!ext/objspace/objspace_dump.c;TI" gc.c;TI"
gc.rb;TI"lib/cgi/session.rb;TI"lib/drb/weakidconv.rb;TI"lib/weakref.rb;T@GcRDoc::TopLevel reachable_objects_from_root-c.ri 0000644 00000001027 15237023631 0013027 0 ustar 00 U:RDoc::AnyMethod[iI" reachable_objects_from_root:ETI"-ObjectSpace::reachable_objects_from_root;TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::List:
@type:
LABEL:@items[o:RDoc::Markup::ListItem:@label[I"MRI specific feature;T; [o:RDoc::Markup::Paragraph; [I",Return all reachable objects from root.;T:
@fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I"5ObjectSpace.reachable_objects_from_root -> hash
;T0[ I"();T@FI"ObjectSpace;TcRDoc::NormalModule00 allocation_sourceline-c.ri 0000644 00000001041 15237023631 0011673 0 ustar 00 U:RDoc::AnyMethod[iI"allocation_sourceline:ETI"'ObjectSpace::allocation_sourceline;TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"GReturns the original line from source for from the given +object+.;To:RDoc::Markup::BlankLine o;
; [I"FSee ::trace_object_allocations for more information and examples.;T:
@fileI""ext/objspace/object_tracing.c;T:0@omit_headings_from_table_of_contents_below0I".allocation_sourceline(object) -> integer
;T0[ I" (p1);T@FI"ObjectSpace;TcRDoc::NormalModule00 internal_super_of-c.ri 0000644 00000001277 15237023631 0011047 0 ustar 00 U:RDoc::AnyMethod[iI"internal_super_of:ETI"#ObjectSpace::internal_super_of;TT:privateo:RDoc::Markup::Document:@parts[ o:RDoc::Markup::List:
@type:
LABEL:@items[o:RDoc::Markup::ListItem:@label[I"MRI specific feature;T; [o:RDoc::Markup::Paragraph; [I":Return internal super class of cls (Class or Module).;To;; [I"5obj can be an instance of InternalObjectWrapper.;To:RDoc::Markup::BlankLine o;; [I"BNote that you should not use this method in your application.;T:
@fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I";ObjectSpace.internal_super_of(cls) -> Class or Module
;T0[ I" (p1);T@FI"ObjectSpace;TcRDoc::NormalModule00 count_tdata_objects-c.ri 0000644 00000003056 15237023631 0011344 0 ustar 00 U:RDoc::AnyMethod[iI"count_tdata_objects:ETI"%ObjectSpace::count_tdata_objects;TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"+Counts objects for each +T_DATA+ type.;To:RDoc::Markup::BlankLine o;
; [I"QThis method is only for MRI developers interested in performance and memory ;TI"usage of Ruby programs.;T@o;
; [I"It returns a hash as:;T@o:RDoc::Markup::Verbatim; [
I"A{RubyVM::InstructionSequence=>504, :parser=>5, :barrier=>6,
;TI"D :mutex=>6, Proc=>60, RubyVM::Env=>57, Mutex=>1, Encoding=>99,
;TI"B ThreadGroup=>1, Binding=>1, Thread=>1, RubyVM=>1, :iseq=>1,
;TI"@ Random=>1, ARGF.class=>1, Data=>1, :autoload=>3, Time=>2}
;TI"5# T_DATA objects existing at startup on r32276.
;T:@format0o;
; [I"LIf the optional argument, result_hash, is given, it is overwritten and ;TI"6returned. This is intended to avoid probe effect.;T@o;
; [I"QThe contents of the returned hash is implementation specific and may change ;TI"in the future.;T@o;
; [I"=In this version, keys are Class object or Symbol object.;T@o;
; [I"OIf object is kind of normal (accessible) object, the key is Class object. ;TI"LIf object is not a kind of normal (internal) object, the key is symbol ;TI"-name, registered by rb_data_type_struct.;T@o;
; [I"6This method is only expected to work with C Ruby.;T:
@fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I" hash
;T0[ I"(*args);T@0FI"ObjectSpace;TcRDoc::NormalModule00 trace_object_allocations_stop-c.ri 0000644 00000001126 15237023631 0013403 0 ustar 00 U:RDoc::AnyMethod[iI""trace_object_allocations_stop:ETI"/ObjectSpace::trace_object_allocations_stop;TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"%Stop tracing object allocations.;To:RDoc::Markup::BlankLine o;
; [I"KNote that if ::trace_object_allocations_start is called n-times, then ;TI"Mtracing will stop after calling ::trace_object_allocations_stop n-times.;T:
@fileI""ext/objspace/object_tracing.c;T:0@omit_headings_from_table_of_contents_below0I"#trace_object_allocations_stop
;T0[ I"();T@FI"ObjectSpace;TcRDoc::NormalModule00 allocation_generation-c.ri 0000644 00000001547 15237023631 0011671 0 ustar 00 U:RDoc::AnyMethod[iI"allocation_generation:ETI"'ObjectSpace::allocation_generation;TT:privateo:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"AReturns garbage collector generation for the given +object+.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"
class B
;TI" include ObjectSpace
;TI"
;TI" def foo
;TI"% trace_object_allocations do
;TI" obj = Object.new
;TI"; p "Generation is #{allocation_generation(obj)}"
;TI"
end
;TI" end
;TI" end
;TI"
;TI"%B.new.foo #=> "Generation is 3"
;T:@format0o;
; [I"FSee ::trace_object_allocations for more information and examples.;T:
@fileI""ext/objspace/object_tracing.c;T:0@omit_headings_from_table_of_contents_below0I"5allocation_generation(object) -> integer or nil
;T0[ I" (p1);T@ FI"ObjectSpace;TcRDoc::NormalModule00 trace_object_allocations-c.ri 0000644 00000002206 15237023631 0012336 0 ustar 00 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 internal_class_of-c.ri 0000644 00000001247 15237023631 0011013 0 ustar 00 U:RDoc::AnyMethod[iI"internal_class_of:ETI"#ObjectSpace::internal_class_of;TT:privateo:RDoc::Markup::Document:@parts[ o:RDoc::Markup::List:
@type:
LABEL:@items[o:RDoc::Markup::ListItem:@label[I"MRI specific feature;T; [o:RDoc::Markup::Paragraph; [I""Return internal class of obj.;To;; [I"5obj can be an instance of InternalObjectWrapper.;To:RDoc::Markup::BlankLine o;; [I"BNote that you should not use this method in your application.;T:
@fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I";ObjectSpace.internal_class_of(obj) -> Class or Module
;T0[ I" (p1);T@FI"ObjectSpace;TcRDoc::NormalModule00 trace_object_allocations_clear-c.ri 0000644 00000000635 15237023631 0013510 0 ustar 00 U:RDoc::AnyMethod[iI"#trace_object_allocations_clear:ETI"0ObjectSpace::trace_object_allocations_clear;TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"(Clear recorded tracing information.;T:
@fileI""ext/objspace/object_tracing.c;T:0@omit_headings_from_table_of_contents_below0I"$trace_object_allocations_clear
;T0[ I"();T@FI"ObjectSpace;TcRDoc::NormalModule00 garbage_collect-c.ri 0000644 00000000465 15237023631 0010424 0 ustar 00 U:RDoc::AnyMethod[iI"garbage_collect:ETI"!ObjectSpace::garbage_collect;TT:privateo:RDoc::Markup::Document:@parts[ :
@fileI"
gc.rb;T:0@omit_headings_from_table_of_contents_below000[ I"C(full_mark: true, immediate_mark: true, immediate_sweep: true);T@FI"ObjectSpace;TcRDoc::NormalModule00 _id2ref-c.ri 0000644 00000000352 15237023631 0006634 0 ustar 00 U:RDoc::AnyMethod[iI"_id2ref:ETI"ObjectSpace::_id2ref;TT:privateo:RDoc::Markup::Document:@parts[ :
@fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[ I" (p1);T@FI"ObjectSpace;TcRDoc::NormalModule00 garbage_collect-i.ri 0000644 00000000464 15237023631 0010431 0 ustar 00 U:RDoc::AnyMethod[iI"garbage_collect:ETI" ObjectSpace#garbage_collect;TF:privateo:RDoc::Markup::Document:@parts[ :
@fileI"
gc.rb;T:0@omit_headings_from_table_of_contents_below000[ I"C(full_mark: true, immediate_mark: true, immediate_sweep: true);T@FI"ObjectSpace;TcRDoc::NormalModule00 reachable_objects_from-c.ri 0000644 00000003764 15237023631 0011776 0 ustar 00 U:RDoc::AnyMethod[iI"reachable_objects_from:ETI"(ObjectSpace::reachable_objects_from;TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::List:
@type:
LABEL:@items[o:RDoc::Markup::ListItem:@label[I"MRI specific feature;T; [o:RDoc::Markup::Paragraph; [I"-Return all reachable objects from `obj'.;To:RDoc::Markup::BlankLine o;; [I":This method returns all reachable objects from `obj'.;T@o;; [I"OIf `obj' has two or more references to the same object `x', then returned ;TI"(array only includes one `x' object.;T@o;; [I"KIf `obj' is a non-markable (non-heap management) object such as true, ;TI"Mfalse, nil, symbols and Fixnums (and Flonum) then it simply returns nil.;T@o;; [ I"QIf `obj' has references to an internal object, then it returns instances of ;TI"PObjectSpace::InternalObjectWrapper class. This object contains a reference ;TI"Nto an internal object and you can check the type of internal object with ;TI"`type' method.;T@o;; [I"QIf `obj' is instance of ObjectSpace::InternalObjectWrapper class, then this ;TI"Kmethod returns all reachable object from an internal object, which is ;TI"pointed by `obj'.;T@o;; [I"1With this method, you can find memory leaks.;T@o;; [I"=This method is only expected to work except with C Ruby.;T@o;; [I"
Example:;To:RDoc::Markup::Verbatim; [I"9ObjectSpace.reachable_objects_from(['a', 'b', 'c'])
;TI" #=> [Array, 'a', 'b', 'c']
;TI"
;TI"9ObjectSpace.reachable_objects_from(['a', 'a', 'a'])
;TI"K#=> [Array, 'a', 'a', 'a'] # all 'a' strings have different object id
;TI"
;TI"9ObjectSpace.reachable_objects_from([v = 'a', v, v])
;TI"#=> [Array, 'a']
;TI"
;TI"+ObjectSpace.reachable_objects_from(1)
;TI"6#=> nil # 1 is not markable (heap managed) object;T:@format0:
@fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I"=ObjectSpace.reachable_objects_from(obj) -> array or nil
;T0[ I" (p1);T@AFI"ObjectSpace;TcRDoc::NormalModule00 count_objects_size-c.ri 0000644 00000002133 15237023631 0011214 0 ustar 00 U:RDoc::AnyMethod[iI"count_objects_size:ETI"$ObjectSpace::count_objects_size;TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"2Counts objects size (in bytes) for each type.;To:RDoc::Markup::BlankLine o;
; [I"FNote that this information is incomplete. You need to deal with ;TI"Cthis information as only a *HINT*. Especially, total size of ;TI"T_DATA may be wrong.;T@o;
; [I"It returns a hash as:;To:RDoc::Markup::Verbatim; [I"S{:TOTAL=>1461154, :T_CLASS=>158280, :T_MODULE=>20672, :T_STRING=>527249, ...}
;T:@format0o;
; [I"6If the optional argument, result_hash, is given, ;TI"%it is overwritten and returned. ;TI",This is intended to avoid probe effect.;T@o;
; [I"BThe contents of the returned hash is implementation defined. ;TI"!It may be changed in future.;T@o;
; [I"6This method is only expected to work with C Ruby.;T:
@fileI"ext/objspace/objspace.c;T:0@omit_headings_from_table_of_contents_below0I";ObjectSpace.count_objects_size([result_hash]) -> hash
;T0[ I"(*args);T@&FI"ObjectSpace;TcRDoc::NormalModule00 undefine_finalizer-c.ri 0000644 00000000566 15237023631 0011171 0 ustar 00 U:RDoc::AnyMethod[iI"undefine_finalizer:ETI"$ObjectSpace::undefine_finalizer;TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"+Removes all finalizers for obj.;T:
@fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I")ObjectSpace.undefine_finalizer(obj)
;T0[ I" (p1);T@FI"ObjectSpace;TcRDoc::NormalModule00 define_finalizer-c.ri 0000644 00000004761 15237023631 0010627 0 ustar 00 U:RDoc::AnyMethod[iI"define_finalizer:ETI""ObjectSpace::define_finalizer;TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"EAdds aProc as a finalizer, to be called after obj ;TI"Cwas destroyed. The object ID of the obj will be passed ;TI"Das an argument to aProc. If aProc is a lambda or ;TI"?method, make sure it can be called with a single argument.;To:RDoc::Markup::BlankLine o;
; [I":The return value is an array [0, aProc].;T@o;
; [ I"JThe two recommended patterns are to either create the finaliser proc ;TI"Lin a non-instance method where it can safely capture the needed state, ;TI"Eor to use a custom callable object that stores the needed state ;TI"&explicitly as instance variables.;T@o:RDoc::Markup::Verbatim; [ I"class Foo
;TI"4 def initialize(data_needed_for_finalization)
;TI"g ObjectSpace.define_finalizer(self, self.class.create_finalizer(data_needed_for_finalization))
;TI" end
;TI"
;TI"? def self.create_finalizer(data_needed_for_finalization)
;TI" proc {
;TI"= puts "finalizing #{data_needed_for_finalization}"
;TI" }
;TI" end
;TI" end
;TI"
;TI"class Bar
;TI" class Remover
;TI"6 def initialize(data_needed_for_finalization)
;TI"H @data_needed_for_finalization = data_needed_for_finalization
;TI"
end
;TI"
;TI" def call(id)
;TI"> puts "finalizing #{@data_needed_for_finalization}"
;TI"
end
;TI" end
;TI"
;TI"4 def initialize(data_needed_for_finalization)
;TI"W ObjectSpace.define_finalizer(self, Remover.new(data_needed_for_finalization))
;TI" end
;TI" end
;T:@format0o;
; [ I"=Note that if your finalizer references the object to be ;TI"Efinalized it will never be run on GC, although it will still be ;TI"Crun at exit. You will get a warning if you capture the object ;TI"6to be finalized as the receiver of the finalizer.;T@o;; [
I"class CapturesSelf
;TI" def initialize(name)
;TI"3 ObjectSpace.define_finalizer(self, proc {
;TI"5 # this finalizer will only be run on exit
;TI"% puts "finalizing #{name}"
;TI" })
;TI" end
;TI" end
;T;
0o;
; [I"NAlso note that finalization can be unpredictable and is never guaranteed ;TI"to be run except on exit.;T:
@fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"5ObjectSpace.define_finalizer(obj, aProc=proc())
;T0[ I"(p1, p2 = v2);T@LFI"ObjectSpace;TcRDoc::NormalModule00 dump_all-i.ri 0000644 00000003036 15237023631 0007127 0 ustar 00 U:RDoc::AnyMethod[iI"
dump_all:ETI"ObjectSpace#dump_all;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"0Dump the contents of the ruby heap as JSON.;To:RDoc::Markup::BlankLine o;
; [I"5_since_ must be a non-negative integer or +nil+.;T@o;
; [I"KIf _since_ is a positive integer, only objects of that generation and ;TI"Pnewer generations are dumped. The current generation can be accessed using ;TI"GC::count.;T@o;
; [I"KObjects that were allocated without object allocation tracing enabled ;TI"Jare ignored. See ::trace_object_allocations for more information and ;TI"examples.;T@o;
; [I"?If _since_ is omitted or is +nil+, all objects are dumped.;T@o;
; [ I"7This method is only expected to work with C Ruby. ;TI">This is an experimental method and is subject to change. ;TI"AIn particular, the function signature and output format are ;TI"@not guaranteed to be compatible in future versions of ruby.;T:
@fileI"!ext/objspace/lib/objspace.rb;T:0@omit_headings_from_table_of_contents_below0I"„ObjectSpace.dump_all([output: :file]) # => #
ObjectSpace.dump_all(output: :stdout) # => nil
ObjectSpace.dump_all(output: :string) # => "{...}\n{...}\n..."
ObjectSpace.dump_all(output:
File.open('heap.json','w')) # => #
ObjectSpace.dump_all(output: :string,
since: 42) # => "{...}\n{...}\n..."
;T0[ I"-(output: :file, full: false, since: nil);T@%FI"ObjectSpace;TcRDoc::NormalModule00 allocation_class_path-c.ri 0000644 00000001451 15237023631 0011651 0 ustar 00 U:RDoc::AnyMethod[iI"allocation_class_path:ETI"'ObjectSpace::allocation_class_path;TT:privateo:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I".Returns the class for the given +object+.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"
class A
;TI" def foo
;TI"2 ObjectSpace::trace_object_allocations do
;TI" obj = Object.new
;TI": p "#{ObjectSpace::allocation_class_path(obj)}"
;TI"
end
;TI" end
;TI" end
;TI"
;TI"A.new.foo #=> "Class"
;T:@format0o;
; [I"FSee ::trace_object_allocations for more information and examples.;T:
@fileI""ext/objspace/object_tracing.c;T:0@omit_headings_from_table_of_contents_below0I"-allocation_class_path(object) -> string
;T0[ I" (p1);T@FI"ObjectSpace;TcRDoc::NormalModule00 dump-i.ri 0000644 00000001516 15237023631 0006300 0 ustar 00 U:RDoc::AnyMethod[iI" dump:ETI"ObjectSpace#dump;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"0Dump the contents of a ruby object as JSON.;To:RDoc::Markup::BlankLine o;
; [ I"7This method is only expected to work with C Ruby. ;TI">This is an experimental method and is subject to change. ;TI"AIn particular, the function signature and output format are ;TI"@not guaranteed to be compatible in future versions of ruby.;T:
@fileI"!ext/objspace/lib/objspace.rb;T:0@omit_headings_from_table_of_contents_below0I"ÈObjectSpace.dump(obj[, output: :string]) # => "{ ... }"
ObjectSpace.dump(obj, output: :file) # => #
ObjectSpace.dump(obj, output: :stdout) # => nil
;T0[ I"(obj, output: :string);T@FI"ObjectSpace;TcRDoc::NormalModule00 count_objects-c.ri 0000644 00000002433 15237023631 0010165 0 ustar 00 U:RDoc::AnyMethod[iI"count_objects:ETI"ObjectSpace::count_objects;TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"(Counts all objects grouped by type.;To:RDoc::Markup::BlankLine o;
; [I" It returns a hash, such as:;To:RDoc::Markup::Verbatim; [I"{
;TI" :TOTAL=>10000,
;TI" :FREE=>3011,
;TI" :T_OBJECT=>6,
;TI" :T_CLASS=>404,
;TI"
# ...
;TI"}
;T:@format0o;
; [I"DThe contents of the returned hash are implementation specific. ;TI"!It may be changed in future.;T@o;
; [ I"6The keys starting with +:T_+ means live objects. ;TI"6For example, +:T_ARRAY+ is the number of arrays. ;TI"7+:FREE+ means object slots which is not used now. ;TI"!+:TOTAL+ means sum of above.;T@o;
; [I"6If the optional argument +result_hash+ is given, ;TI"Lit is overwritten and returned. This is intended to avoid probe effect.;T@o;; [ I"h = {}
;TI""ObjectSpace.count_objects(h)
;TI"puts h
;TI"S# => { :TOTAL=>10000, :T_CLASS=>158280, :T_MODULE=>20672, :T_STRING=>527249 }
;T;
0o;
; [I"4This method is only expected to work on C Ruby.;T:
@fileI" gc.c;T:0@omit_headings_from_table_of_contents_below0I"6ObjectSpace.count_objects([result_hash]) -> hash
;T0[ I"(*args);T@2FI"ObjectSpace;TcRDoc::NormalModule00 WeakMap/length-i.ri 0000644 00000000572 15237023631 0010142 0 ustar 00 U:RDoc::AnyMethod[iI"length:ETI" ObjectSpace::WeakMap#length;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"-Returns the number of referenced objects;To:RDoc::Markup::BlankLine :
@fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"WeakMap;TcRDoc::NormalClass0[I"ObjectSpace::WeakMap;TFI" size;T WeakMap/each_pair-i.ri 0000644 00000000624 15237023631 0010572 0 ustar 00 U:RDoc::AnyMethod[iI"each_pair:ETI"#ObjectSpace::WeakMap#each_pair;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"AIterates over keys and objects in a weakly referenced object;To:RDoc::Markup::BlankLine :
@fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"WeakMap;TcRDoc::NormalClass0[I"ObjectSpace::WeakMap;TFI" each;T WeakMap/each_value-i.ri 0000644 00000000556 15237023631 0010757 0 ustar 00 U:RDoc::AnyMethod[iI"each_value:ETI"$ObjectSpace::WeakMap#each_value;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"AIterates over keys and objects in a weakly referenced object;To:RDoc::Markup::BlankLine :
@fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"WeakMap;TcRDoc::NormalClass00 WeakMap/inspect-i.ri 0000644 00000000353 15237023631 0010323 0 ustar 00 U:RDoc::AnyMethod[iI"inspect:ETI"!ObjectSpace::WeakMap#inspect;TF:privateo:RDoc::Markup::Document:@parts[ :
@fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"WeakMap;TcRDoc::NormalClass00 WeakMap/key%3f-i.ri 0000644 00000000571 15237023631 0007746 0 ustar 00 U:RDoc::AnyMethod[iI" key?:ETI"ObjectSpace::WeakMap#key?;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"*Returns +true+ if +key+ is registered;To:RDoc::Markup::BlankLine :
@fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[ I" (p1);T@FI"WeakMap;TcRDoc::NormalClass0[I"ObjectSpace::WeakMap;TFI"
include?;T WeakMap/values-i.ri 0000644 00000000550 15237023631 0010154 0 ustar 00 U:RDoc::AnyMethod[iI"values:ETI" ObjectSpace::WeakMap#values;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"CIterates over values and objects in a weakly referenced object;To:RDoc::Markup::BlankLine :
@fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"WeakMap;TcRDoc::NormalClass00 WeakMap/include%3f-i.ri 0000644 00000000566 15237023631 0010605 0 ustar 00 U:RDoc::AnyMethod[iI"
include?:ETI""ObjectSpace::WeakMap#include?;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"*Returns +true+ if +key+ is registered;To:RDoc::Markup::BlankLine :
@fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[[I"member?;T@ [I" key?;T@ I" (p1);T@FI"WeakMap;TcRDoc::NormalClass00 WeakMap/size-i.ri 0000644 00000000537 15237023631 0007634 0 ustar 00 U:RDoc::AnyMethod[iI" size:ETI"ObjectSpace::WeakMap#size;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"-Returns the number of referenced objects;To:RDoc::Markup::BlankLine :
@fileI" gc.c;T:0@omit_headings_from_table_of_contents_below000[[I"length;T@ I"();T@FI"WeakMap;TcRDoc::NormalClass00 WeakMap/%5b%5d-i.ri 0000644 00000000533 15237023631 0007527 0 ustar 00 U:RDoc::AnyMethod[iI"[]:ETI"ObjectSpace::WeakMap#[];TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"