JS_GetGCParameter

  • Revision slug: SpiderMonkey/JSAPI_Reference/JS_GetGCParameter
  • Revision title: JS_GetGCParameter
  • Revision id: 139068
  • Created:
  • Creator: Jorend
  • Is current revision? No
  • Comment 32 words added; page display name changed to 'JS_GetGCParameter'

Revision Content

Adjust performance parameters related to garbage collection.

Syntax

typedef enum JSGCParamKey {
    JSGC_MAX_BYTES,
    JSGC_MAX_MALLOC_BYTES,
    JSGC_STACKPOOL_LIFESPAN,
    JSGC_TRIGGER_FACTOR{{ jsapi_inline_minversion("1.8.1") }},
    JSGC_BYTES{{ jsapi_inline_minversion("1.8.1") }},
    JSGC_NUMBER{{ jsapi_inline_minversion("1.8.1") }}
} JSGCParamKey;

uint32 JS_GetGCParameter(JSRuntime *rt, JSGCParamKey key);{{ jsapi_inline_minversion("1.8.1") }}

void JS_SetGCParameter(JSRuntime *rt, JSGCParamKey key, uint32 value);
Name Type Description
rt JSRuntime * The runtime to configure.
key JSGCParamKey Specifies which garbage collection parameter to get or set.
value uint32 (JS_SetGCParameter only) The value to assign to the parameter.

Description

{{ LXRSearch("ident", "i", "JS_GetGCParameter") }}

{{ LXRSearch("ident", "i", "JS_SetGCParameter") }}

Revision Source

<p>Adjust performance parameters related to garbage collection.</p>
<h2 name="Syntax">Syntax</h2>
<pre class="eval">typedef enum JSGCParamKey {
    <strong>JSGC_MAX_BYTES</strong>,
    <strong>JSGC_MAX_MALLOC_BYTES</strong>,
    <strong>JSGC_STACKPOOL_LIFESPAN</strong>,
    <strong>JSGC_TRIGGER_FACTOR</strong>{{ jsapi_inline_minversion("1.8.1") }},
    <strong>JSGC_BYTES</strong>{{ jsapi_inline_minversion("1.8.1") }},
    <strong>JSGC_NUMBER</strong>{{ jsapi_inline_minversion("1.8.1") }}
} <strong>JSGCParamKey</strong>;

<a href="/en/SpiderMonkey/JSAPI_Reference/jsint" title="en/jsint">uint32</a> <strong>JS_GetGCParameter</strong>(<a href="/en/SpiderMonkey/JSAPI_Reference/JSRuntime" title="en/JSRuntime">JSRuntime</a> *rt, JSGCParamKey key);{{ jsapi_inline_minversion("1.8.1") }}

void <strong>JS_SetGCParameter</strong>(<a href="/en/SpiderMonkey/JSAPI_Reference/JSRuntime" title="en/JSRuntime">JSRuntime</a> *rt, JSGCParamKey key, <a href="/en/SpiderMonkey/JSAPI_Reference/jsint" title="en/jsint">uint32</a> value);
</pre>
<table class="fullwidth-table"> <tbody> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> <tr> <td><code>rt</code></td> <td><code><a href="/en/SpiderMonkey/JSAPI_Reference/JSRuntime" title="en/JSRuntime">JSRuntime</a> *</code></td> <td>The runtime to configure.</td> </tr> <tr> <td><code>key</code></td> <td><code>JSGCParamKey</code></td> <td>Specifies which garbage collection parameter to get or set.</td> </tr> <tr> <td><code>value</code></td> <td><code><a href="/en/SpiderMonkey/JSAPI_Reference/jsint" title="en/jsint">uint32</a></code></td> <td><em>(<code>JS_SetGCParameter</code> only)</em> The value to assign to the parameter.</td> </tr> </tbody>
</table>
<h2 name="Description">Description</h2>
<p>{{ LXRSearch("ident", "i", "JS_GetGCParameter") }}</p>
<p>{{ LXRSearch("ident", "i", "JS_SetGCParameter") }}</p>
Revert to this revision