Skip to content

Commit a5604a7

Browse files
Rodrigo Brunotargos
Rodrigo Bruno
authored andcommitted
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: v8#80 PR-URL: #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>
1 parent dca0300 commit a5604a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_process.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ void MemoryUsage(const FunctionCallbackInfo<Value>& args) {
208208
fields[0] = rss;
209209
fields[1] = v8_heap_stats.total_heap_size();
210210
fields[2] = v8_heap_stats.used_heap_size();
211-
fields[3] = isolate->AdjustAmountOfExternalAllocatedMemory(0);
211+
fields[3] = v8_heap_stats.external_memory();
212212
}
213213

214214
// Most of the time, it's best to use `console.error` to write

0 commit comments

Comments
 (0)