From e35f0e203cb7600b208fe8b6367a4021350503e2 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` --- 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 d4779e6a2f8c77..379c1cc85901b8 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. @@ -1193,11 +1194,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])