D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
GC
/
Filename :
config-c.ri
back
Copy
U:RDoc::AnyMethod[iI"config:ETI"GC::config;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I";Sets or gets information about the current \GC config.;To:RDoc::Markup::BlankLine o; ; [I"MConfiguration parameters are \GC implementation-specific and may change ;TI"without notice.;T@o; ; [I"QThis method can be called without parameters to retrieve the current config ;TI"$as a +Hash+ with +Symbol+ keys.;T@o; ; [I"OThis method can also be called with a +Hash+ argument to assign values to ;TI"Pvalid config keys. Config keys missing from the passed +Hash+ will be left ;TI"unmodified.;T@o; ; [ I"PIf a key/value pair is passed to this function that does not correspond to ;TI"Qa valid config key for the \GC implementation being used, no config will be ;TI"Oupdated, the key will be present in the returned Hash, and its value will ;TI"Pbe +nil+. This is to facilitate easy migration between \GC implementations.;T@o; ; [ I"TIn both call-seqs, the return value of <code>GC.config</code> will be a +Hash+ ;TI"Ncontaining the most recent full configuration, i.e., all keys and values ;TI"Mdefined by the specific \GC implementation being used. In the case of a ;TI"Oconfig update, the return value will include the new values being updated.;T@o; ; [I"3This method is only expected to work on CRuby.;T@S:RDoc::Markup::Heading: leveli: textI"*\GC Implementation independent values;T@o; ; [I"OThe <code>GC.config</code> hash can also contain keys that are global and ;TI"Rread-only. These keys are not specific to any one \GC library implementation ;TI"@and attempting to write to them will raise +ArgumentError+.;T@o; ; [I"7There is currently only one global, read-only key:;T@o:RDoc::Markup::List: @type: LABEL:@items[o:RDoc::Markup::ListItem:@label[I"implementation;T; [o; ; [I"QReturns a +String+ containing the name of the currently loaded \GC library, ;TI"Pif one has been loaded using +RUBY_GC_LIBRARY+, and "default" in all other ;TI" cases;T@S;; i;I"'\GC Implementation specific values;T@o; ; [I"P\GC libraries are expected to document their own configuration. Valid keys ;TI"/for Ruby's default \GC implementation are:;T@o;;;;[o;;[I"rgengc_allow_full_mark;T; [o; ; [I"RControls whether the \GC is allowed to run a full mark (young & old objects).;T@o; ; [I"XWhen +true+, \GC interleaves major and minor collections. This is the default. \GC ;TI"will function as intended.;T@o; ; [ I"JWhen +false+, the \GC will never trigger a full marking cycle unless ;TI"Nexplicitly requested by user code. Instead, only a minor mark will run—;TI"Nonly young objects will be marked. When the heap space is exhausted, new ;TI"Hpages will be allocated immediately instead of running a full mark.;T@o; ; [I"<A flag will be set to notify that a full mark has been ;TI".requested. This flag is accessible using ;TI"4<code>GC.latest_gc_info(:needs_major_by)</code>;T@o; ; [I"?The user can trigger a major collection at any time using ;TI"+<code>GC.start(full_mark: true)</code>;T@o; ; [I"NWhen +false+, Young to Old object promotion is disabled. For performance ;TI"Qreasons, it is recommended to warm up an application using +Process.warmup+ ;TI".before setting this parameter to +false+.;T: @fileI" gc.rb;T:0@omit_headings_from_table_of_contents_below0I"/GC.config -> hash GC.config(hash) -> hash ;T0[ I"(hash = nil);T@gFI"GC;TcRDoc::NormalModule00