diff options
author | Rodrigo Bruno <rfbpb@google.com> | 2018-08-07 15:18:50 +0200 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2018-09-22 18:29:49 +0200 |
commit | a5604a73d8d52219bcb97ff2934f81b67edc11af (patch) | |
tree | e50216aa72523803008062c9b370787fb82c4e63 /src | |
parent | dca0300a86eb8a24ea38faff2b4d27567ab54707 (diff) | |
download | node-new-a5604a73d8d52219bcb97ff2934f81b67edc11af.tar.gz |
src: use HeapStatistics to get external memory
V8 is improving the way external memory is internally managed and how
it is reported.
External memory should now be retrieved using HeapStatistics.
Refs: https://github.com/v8/node/pull/80
PR-URL: https://github.com/nodejs/node/pull/22754
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/node_process.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_process.cc b/src/node_process.cc index c223b482cf..51041c49ed 100644 --- a/src/node_process.cc +++ b/src/node_process.cc @@ -208,7 +208,7 @@ void MemoryUsage(const FunctionCallbackInfo<Value>& args) { fields[0] = rss; fields[1] = v8_heap_stats.total_heap_size(); fields[2] = v8_heap_stats.used_heap_size(); - fields[3] = isolate->AdjustAmountOfExternalAllocatedMemory(0); + fields[3] = v8_heap_stats.external_memory(); } // Most of the time, it's best to use `console.error` to write |