From 5a61b99d98c3df4198709445c2ff306068ba1ce1 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Sat, 12 Nov 2016 16:49:40 -0500 Subject: [PATCH] process: add `process.memoryUsage.external` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/9587 Reviewed-By: Ben Noordhuis Reviewed-By: Matteo Collina Reviewed-By: Michaël Zasso Reviewed-By: Johan Bergström Reviewed-By: Colin Ihrig Reviewed-By: Roman Reiss Reviewed-By: Anna Henningsen --- doc/api/process.md | 6 +++++- src/env.h | 1 + src/node.cc | 4 ++++ test/parallel/test-memory-usage.js | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/api/process.md b/doc/api/process.md index 133a3dd6467038..7b74080352c6f1 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1175,6 +1175,7 @@ added: v0.1.16 * `rss` {Integer} * `heapTotal` {Integer} * `heapUsed` {Integer} + * `external` {Integer} The `process.memoryUsage()` method returns an object describing the memory usage of the Node.js process measured in bytes. @@ -1191,11 +1192,14 @@ Will generate: { rss: 4935680, heapTotal: 1826816, - heapUsed: 650472 + heapUsed: 650472, + external: 49879 } ``` `heapTotal` and `heapUsed` refer to V8's memory usage. +`external` refers to the memory usage of C++ objects bound to JavaScript +objects managed by V8. ## process.nextTick(callback[, ...args])