Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Unified Diff: src/heap/heap.cc

Issue 2910203002: [api] Add an API function to set the GetExternallyAllocatedMemoryInBytesCallback. (Closed)
Patch Set: comment Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/heap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index d7f25874295d0f14c16a9ac149b3b7f824562255..b6046444529a6c929caf16393dd2b4a76fa7807a 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -381,6 +381,8 @@ void Heap::PrintShortHeapStatistics() {
this->CommittedMemory() / KB);
PrintIsolate(isolate_, "External memory reported: %6" PRId64 " KB\n",
external_memory_ / KB);
+ PrintIsolate(isolate_, "External memory global %zu KB\n",
+ external_memory_callback_() / KB);
PrintIsolate(isolate_, "Total time spent in GC : %.1f ms\n",
total_gc_time_ms_);
}
@@ -964,7 +966,6 @@ void Heap::ReportExternalMemoryPressure() {
}
}
-
void Heap::EnsureFillerObjectAtTop() {
// There may be an allocation memento behind objects in new space. Upon
// evacuation of a non-full new space (or if we are on the last page) there
@@ -5739,6 +5740,9 @@ bool Heap::SetUp() {
*this, ScavengeJob::kBytesAllocatedBeforeNextIdleTask);
new_space()->AddAllocationObserver(idle_scavenge_observer_);
+ SetGetExternallyAllocatedMemoryInBytesCallback(
+ DefaultGetExternallyAllocatedMemoryInBytesCallback);
+
return true;
}
« no previous file with comments | « src/heap/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698