diff options
author | theanarkh <2923878201@qq.com> | 2022-04-23 18:35:36 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2022-04-28 07:57:22 +0300 |
commit | a19fb609d8ef168c2b7606123d72f2bc331bdec1 (patch) | |
tree | 394c04afbac76b25ebf54ed7deaad382e45fb68d /doc/api/v8.md | |
parent | b0f7c4c8f928597f2118dde73c98ac0fba8f01f9 (diff) |
v8: export more fields in getHeapStatistics
export total_global_handles_size, used_global_handles_size,
external_memory in getHeapStatistics
PR-URL: https://github.com/nodejs/node/pull/42784
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/v8.md')
-rw-r--r-- | doc/api/v8.md | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/doc/api/v8.md b/doc/api/v8.md index 2126a0bd5e6..03c8e0e9571 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -180,6 +180,9 @@ Returns an object with the following properties: * `does_zap_garbage` {number} * `number_of_native_contexts` {number} * `number_of_detached_contexts` {number} +* `total_global_handles_size` {number} +* `used_global_handles_size` {number} +* `external_memory` {number} `does_zap_garbage` is a 0/1 boolean, which signifies whether the `--zap_code_space` option is enabled or not. This makes V8 overwrite heap @@ -195,6 +198,15 @@ a memory leak. of contexts that were detached and not yet garbage collected. This number being non-zero indicates a potential memory leak. +`total_global_handles_size` The value of total\_global\_handles\_size is the +total memory size of V8 global handles. + +`used_global_handles_size` The value of used\_global\_handles\_size is the +used memory size of V8 global handles. + +`external_memory` The value of external\_memory is the memory size of array +buffers and external strings. + <!-- eslint-skip --> ```js @@ -209,7 +221,10 @@ being non-zero indicates a potential memory leak. peak_malloced_memory: 1127496, does_zap_garbage: 0, number_of_native_contexts: 1, - number_of_detached_contexts: 0 + number_of_detached_contexts: 0, + total_global_handles_size: 8192, + used_global_handles_size: 3296, + external_memory: 318824 } ``` |