summaryrefslogtreecommitdiff
path: root/doc/api/v8.md
diff options
context:
space:
mode:
authorGareth Ellis <gareth.ellis@uk.ibm.com>2016-09-17 10:52:26 +0100
committerAnna Henningsen <anna@addaleax.net>2016-11-20 02:23:00 +0100
commit440057eae048821fb8ae11313663de4fcced2cfd (patch)
treea645382f6a4728830647ad2b82bf32e4c6079911 /doc/api/v8.md
parent31dac410a43455a6facbf2a573bcd792a63ba0ca (diff)
downloadandroid-node-v8-440057eae048821fb8ae11313663de4fcced2cfd.tar.gz
android-node-v8-440057eae048821fb8ae11313663de4fcced2cfd.tar.bz2
android-node-v8-440057eae048821fb8ae11313663de4fcced2cfd.zip
src: extend `HeapStatistics` with new fields
src: Add does_zap_garbage, malloced_memory and peak_malloced_memory to v8 HeapStatistics Following https://github.com/nodejs/code-and-learn/issues/56 I have exposed does_zap_garbage to HeapStatistics. The other fields, malloced_memory and peak_malloced_memory don't seem to be in the current version of v8 in master. PR-URL: https://github.com/nodejs/node/pull/8610 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'doc/api/v8.md')
-rw-r--r--doc/api/v8.md14
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/api/v8.md b/doc/api/v8.md
index 82169d0486..8cec6bdfdf 100644
--- a/doc/api/v8.md
+++ b/doc/api/v8.md
@@ -22,6 +22,15 @@ Returns an object with the following properties:
* `total_available_size` {number}
* `used_heap_size` {number}
* `heap_size_limit` {number}
+* `malloced_memory` {number}
+* `peak_malloced_memory` {number}
+* `does_zap_garbage` {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 garbage with a bit
+pattern. The RSS footprint (resident memory set) gets bigger because it
+continuously touches all heap pages and that makes them less likely to get
+swapped out by the operating system.
For example:
@@ -32,7 +41,10 @@ For example:
total_physical_size: 7326976,
total_available_size: 1152656,
used_heap_size: 3476208,
- heap_size_limit: 1535115264
+ heap_size_limit: 1535115264,
+ malloced_memory: 16384,
+ peak_malloced_memory: 1127496,
+ does_zap_garbage: 0
}
```