Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > f448deafa1de20c56618e7ac9c6ef5d7 > files > 82

Falcon-doc-0.9.6.6-1.fc14.noarch.rpm

<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>Object GC - Object GC</title>
   <link href="faldoc.css" rel="stylesheet" type="text/css"/>
   <link href="tabs.css" rel="stylesheet" type="text/css"/>
</head>
<body class="faldoc_body">
<div class="navitop">
   <div class="tabs">
      <ul>
         <li><a href="./index.html"><span>Main</span></a></li>
         <li><a href="./pages.html"><span>Related pages</span></a></li>
         <li><a href="./groups.html"><span>Groups</span></a></li>
         <li><a href="./funset.html"><span>Function sets</span></a></li>
         <li><a href="./classes.html"><span>Classes</span></a></li>
         <li><a href="./objects.html"><span>Objects</span></a></li>
         <li><a href="./functions.html"><span>All functions</span></a></li>
         <li><a href="./globals.html"><span>Globals</span></a></li>
         
      </ul>
   </div>
</div>
<hr/>

<h1 class="faldoc_title">Object GC</h1>

<p class="faldoc_brief">Support for script-based garbage collection strategies. </p>
<p class="faldoc_funcdecl">
<b>object</b> GC
</p>


   
   <h2 class="faldoc_title">Summary</h2>
   <table class="faldoc_list">
   
      
         <tr><td><a href="#items">items</a></td><td>Single GC sensible items currently allocated.</td></tr>
      
         <tr><td><a href="#th_active">th_active</a></td><td>Threshold of occupied memory above which the GC will enter the active mode.</td></tr>
      
         <tr><td><a href="#th_normal">th_normal</a></td><td>Threshold of occupied memory above which the GC will enter the normal mode.</td></tr>
      
         <tr><td><a href="#usedMem">usedMem</a></td><td>Memory used by the Falcon engine.</td></tr>
      
   
      
         <tr><td><a href="#adjust">adjust()</a></td><td>Sets or gets the automatic threshold levels adjust algorithm. </td></tr>
      
         <tr><td><a href="#enable">enable()</a></td><td>Turns automatic GC feature on or off. </td></tr>
      
         <tr><td><a href="#perform">perform()</a></td><td>Requests immediate check of garbage. </td></tr>
      
   
   </table>









   <h2 class="faldoc_title">Properties</h2>
   
      <h3 class="faldoc_funcname"><a name="items">items</a></h3>
      <p class="item_brief">Single GC sensible items currently allocated.</p>
      
      
      
   
      <h3 class="faldoc_funcname"><a name="th_active">th_active</a></h3>
      <p class="item_brief">Threshold of occupied memory above which the GC will enter the active mode.</p>
      
      
      
   
      <h3 class="faldoc_funcname"><a name="th_normal">th_normal</a></h3>
      <p class="item_brief">Threshold of occupied memory above which the GC will enter the normal mode.</p>
      
      
      
   
      <h3 class="faldoc_funcname"><a name="usedMem">usedMem</a></h3>
      <p class="item_brief">Memory used by the Falcon engine.</p>
      
      
      
   

   <h2 class="faldoc_title">Methods</h2>
   
      <h3 class="faldoc_funcname"><a name="adjust">adjust()</a></h3>
      <p class="item_brief">Sets or gets the automatic threshold levels adjust algorithm. </p>
      <p class="faldoc_funcdecl">GC.adjust( [mode] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">mode</td><td class="faldoc_optparamdesc">The adjust mode used by the GC. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The mode currently set. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">Mode can be one of: </p>
<ul>
<li>GC.ADJ_NONE: No adjust. All adjusting must be done manually. </li><li>GC.ADJ_STRICT: Aggressive adjustment strategy, forcing active collection whenever the memory grows. </li><li>GC.ADJ_LOOSE: Permissive adjustment strategy, forcing active collection only when memory grows promptly. </li><li>GC.ADJ_SMOOTH_FAST: Adjustment following the memory allocation status with some delay and a smooth asymptotic curve (fast adaption). </li><li>GC.ADJ_SMOOTH_SLOW: Adjustment following the memory allocation status with some delay and a smooth asymptotic curve (slow adaption). </li>
</ul>
</p>
   
      <h3 class="faldoc_funcname"><a name="enable">enable()</a></h3>
      <p class="item_brief">Turns automatic GC feature on or off. </p>
      <p class="faldoc_funcdecl">GC.enable( mode )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">mode</td><td class="faldoc_paramdesc">true to turn automatic GC on, false to turn it off. </td></tr>
         
         
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">Virtual machines and some heavy garbage generating functions call periodically a function that checks for the level of allocated memory to have reached a critical point. When there is too much allocated memory of uncertain status, a garbage collecting loop is started. </p>
<p class="faldoc_text">By setting this property to false, this automatic control is skipped, and allocated memory can grow up to physical process limits (or VM memory limit constraints, if provided). Setting this value to true will cause VM to perform memory control checks again with the usual strategy. </p>
<p class="faldoc_text"> In case the script is sure to have generated a wide amount of garbage, it is advisable to call explicitly <a href="./object_GC.html#perform">GC.perform</a>() before turning automatic GC on, as the "natural" collection loop may start at any later moment, also after several VM loops. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="perform">perform()</a></h3>
      <p class="item_brief">Requests immediate check of garbage. </p>
      <p class="faldoc_funcdecl">GC.perform( [wcoll] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">wcoll</td><td class="faldoc_optparamdesc">Set to true to wait for the collection of free memory to be complete. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">true if the gc has been actually performed, false otherwise. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">Suspends the activity of the calling Virtual Machine, waiting for the garbage collector to complete a scan loop before proceeding. </p>
</p>
   

<hr/>
<div class="navibottom">
   <center>
      <a href="./index.html">Main</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./pages.html">Related pages</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./groups.html">Groups</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./funset.html">Function sets</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./classes.html">Classes</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./objects.html">Objects</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./functions.html">All functions</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./globals.html">Globals</a>
   </center>
</div>
</div>
<div class="faldoc_signature">Made with <a href="http://www.falconpl.org">faldoc 2.2.0</div>
</body>
</html>