[api] GetHeapStatistics: Only report backing stores as external memory
Whether backing stores are on V8's heap or not is opaque to JavaScript. This is not true for other external memory such as DOM which is why only backingstores are considered as on heap. Bug: chromium:914304 Change-Id: Idfeb9815daeee239a6a5b95077421e555bfe5fda Reviewed-on: https://chromium-review.googlesource.com/c/1454726 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#59389}
This commit is contained in:
parent
f71dd204bf
commit
dfa7e3f7d0
@ -8405,7 +8405,7 @@ void Isolate::GetHeapStatistics(HeapStatistics* heap_statistics) {
|
||||
heap_statistics->malloced_memory_ =
|
||||
isolate->allocator()->GetCurrentMemoryUsage() +
|
||||
isolate->wasm_engine()->allocator()->GetCurrentMemoryUsage();
|
||||
heap_statistics->external_memory_ = isolate->heap()->external_memory();
|
||||
heap_statistics->external_memory_ = isolate->heap()->backing_store_bytes();
|
||||
heap_statistics->peak_malloced_memory_ =
|
||||
isolate->allocator()->GetMaxMemoryUsage() +
|
||||
isolate->wasm_engine()->allocator()->GetMaxMemoryUsage();
|
||||
|
Loading…
Reference in New Issue
Block a user