{
  "source": "doc/api/v8.markdown",
  "modules": [
    {
      "textRaw": "V8",
      "name": "v8",
      "stability": 2,
      "stabilityText": "Stable",
      "desc": "<p>This module exposes events and interfaces specific to the version of [V8][]\nbuilt with Node.js.  These interfaces are subject to change by upstream and are\ntherefore not covered under the stability index.\n\n</p>\n",
      "methods": [
        {
          "textRaw": "getHeapStatistics()",
          "type": "method",
          "name": "getHeapStatistics",
          "desc": "<p>Returns an object with the following properties\n\n</p>\n<pre><code>{\n  total_heap_size: 7326976,\n  total_heap_size_executable: 4194304,\n  total_physical_size: 7326976,\n  total_available_size: 1152656,\n  used_heap_size: 3476208,\n  heap_size_limit: 1535115264\n}</code></pre>\n",
          "signatures": [
            {
              "params": []
            }
          ]
        },
        {
          "textRaw": "getHeapSpaceStatistics()",
          "type": "method",
          "name": "getHeapSpaceStatistics",
          "desc": "<p>Returns statistics about the V8 heap spaces, i.e. the segments which make up\nthe V8 heap. Order of heap spaces nor availability of a heap space can be\nguaranteed as the statistics are provided via the V8 <code>GetHeapSpaceStatistics</code>\nfunction.\n\n</p>\n<p>Example result:\n\n</p>\n<pre><code>[\n  {\n    &quot;space_name&quot;: &quot;new_space&quot;,\n    &quot;space_size&quot;: 2063872,\n    &quot;space_used_size&quot;: 951112,\n    &quot;space_available_size&quot;: 80824,\n    &quot;physical_space_size&quot;: 2063872\n  },\n  {\n    &quot;space_name&quot;: &quot;old_space&quot;,\n    &quot;space_size&quot;: 3090560,\n    &quot;space_used_size&quot;: 2493792,\n    &quot;space_available_size&quot;: 0,\n    &quot;physical_space_size&quot;: 3090560\n  },\n  {\n    &quot;space_name&quot;: &quot;code_space&quot;,\n    &quot;space_size&quot;: 1260160,\n    &quot;space_used_size&quot;: 644256,\n    &quot;space_available_size&quot;: 960,\n    &quot;physical_space_size&quot;: 1260160\n  },\n  {\n    &quot;space_name&quot;: &quot;map_space&quot;,\n    &quot;space_size&quot;: 1094160,\n    &quot;space_used_size&quot;: 201608,\n    &quot;space_available_size&quot;: 0,\n    &quot;physical_space_size&quot;: 1094160\n  },\n  {\n    &quot;space_name&quot;: &quot;large_object_space&quot;,\n    &quot;space_size&quot;: 0,\n    &quot;space_used_size&quot;: 0,\n    &quot;space_available_size&quot;: 1490980608,\n    &quot;physical_space_size&quot;: 0\n  }\n]</code></pre>\n",
          "signatures": [
            {
              "params": []
            }
          ]
        },
        {
          "textRaw": "setFlagsFromString(string)",
          "type": "method",
          "name": "setFlagsFromString",
          "desc": "<p>Set additional V8 command line flags.  Use with care; changing settings\nafter the VM has started may result in unpredictable behavior, including\ncrashes and data loss.  Or it may simply do nothing.\n\n</p>\n<p>The V8 options available for a version of Node.js may be determined by running\n<code>node --v8-options</code>.  An unofficial, community-maintained list of options\nand their effects is available [here][].\n\n</p>\n<p>Usage:\n\n</p>\n<pre><code>// Print GC events to stdout for one minute.\nconst v8 = require(&#39;v8&#39;);\nv8.setFlagsFromString(&#39;--trace_gc&#39;);\nsetTimeout(function() { v8.setFlagsFromString(&#39;--notrace_gc&#39;); }, 60e3);</code></pre>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "string"
                }
              ]
            }
          ]
        }
      ],
      "type": "module",
      "displayName": "V8"
    }
  ]
}
