Skip to content

Commit

Permalink
src: use HeapStatistics to get external memory
Browse files Browse the repository at this point in the history
V8 is improving the way external memory is internally managed and how
it is reported.
External memory should now be retrieved using HeapStatistics.

Refs: v8#80

PR-URL: #22754
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
Rodrigo Bruno authored and targos committed Sep 22, 2018
1 parent dca0300 commit a5604a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a5604a7

Please sign in to comment.