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

Unified Diff: runtime/vm/dart.cc

Issue 2644903003: Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmall… (Closed)
Patch Set: Created 3 years, 11 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
Index: runtime/vm/dart.cc
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 57f5cbe759f160cb13e4894006d30ffca83a1c70..d50189f68dd5f3a9e3bd71f77409373facca1201 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -17,6 +17,7 @@
#include "vm/heap.h"
#include "vm/isolate.h"
#include "vm/kernel_isolate.h"
+#include "vm/malloc_hooks.h"
#include "vm/message_handler.h"
#include "vm/metrics.h"
#include "vm/object.h"
@@ -154,6 +155,7 @@ char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot,
start_time_micros_ = OS::GetCurrentMonotonicMicros();
VirtualMemory::InitOnce();
OSThread::InitOnce();
+ MallocHooks::InitOnce();
if (FLAG_support_timeline) {
Timeline::InitOnce();
}
@@ -491,7 +493,7 @@ const char* Dart::Cleanup() {
if (FLAG_trace_shutdown) {
OS::PrintErr("[+%" Pd64 "ms] SHUTDOWN: Done\n", UptimeMillis());
}
-
+ MallocHooks::TearDown();
return NULL;
}

Powered by Google App Engine
This is Rietveld 408576698