<?xml version="1.0" encoding="us-ascii"?><span> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>mono-api-gc.html</title> <style type="text/css"> h3 { font-size: 18px; padding-bottom: 4pt; border-bottom: 2px solid #dddddd; } .api { border: 1px solid; padding: 10pt; margin: 10pt; } .api-entry { border-bottom: none; font-size: 18px; } .prototype { border: 1px solid; background-color: #f2f2f2; padding: 5pt; margin-top: 5pt; margin-bottom: 5pt; } .header { border: 1px solid; padding: 0 0 5pt 5pt; margin: 10pt; white-space: pre; font-family: monospace; } .code { border: 1px solid; padding: 0 0 5pt 5pt; margin: 10pt; white-space: pre; font-family: monospace; } </style> </head> <body> <h1>Garbage Collector Interface</h1> <h1>Public Interface</h1> <p />The public interface of the Mono GC is fairly limited, and its the only one that embedders should be using: <a name="api:mono_gc_collect"></a> <div class="api"> <div class="api-entry">mono_gc_collect</div> <div class="prototype">void mono_gc_collect (int generation) </div> <p /> <b>Parameters</b> <blockquote><dt><i>generation:</i></dt><dd> GC generation identifier</dd></blockquote> <b>Remarks</b> <p /> Perform a garbage collection for the given generation, higher numbers mean usually older objects. Collecting a high-numbered generation implies collecting also the lower-numbered generations. The maximum value for <i>generation</i> can be retrieved with a call to mono_gc_max_generation(), so this function is usually called as: mono_gc_collect (mono_gc_max_generation ()); </div> <a name="api:mono_gc_max_generation"></a> <div class="api"> <div class="api-entry">mono_gc_max_generation</div> <div class="prototype">int mono_gc_max_generation (void) </div> <p /> <b>Returns</b> <blockquote> the maximum generation number. </blockquote> <b>Remarks</b> <p /> Get the maximum generation number used by the current garbage collector. The value will be 0 for the Boehm collector, 1 or more for the generational collectors. </div> <a name="api:mono_gc_get_heap_size"></a> <div class="api"> <div class="api-entry">mono_gc_get_heap_size</div> <div class="prototype">int64_t mono_gc_get_heap_size (void) </div> <p /> <b>Returns</b> <blockquote> the size of the heap in bytes </blockquote> <b>Remarks</b> <p /> Get the amount of memory used by the garbage collector. </div></body> </html> </span>