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

Unified Diff: runtime/vm/malloc_hooks_unsupported.cc

Issue 2623613003: Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmall… (Closed)
Patch Set: Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmall… 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
« no previous file with comments | « runtime/vm/malloc_hooks_test.cc ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/malloc_hooks_unsupported.cc
diff --git a/runtime/vm/malloc_hooks_unsupported.cc b/runtime/vm/malloc_hooks_unsupported.cc
index 65edca7bff776d8d8c571b97c1e3e95c0e199a2c..6f16518312f54210be66d63cc3afc6f689524a5c 100644
--- a/runtime/vm/malloc_hooks_unsupported.cc
+++ b/runtime/vm/malloc_hooks_unsupported.cc
@@ -2,16 +2,38 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-#if defined(DART_USE_TCMALLOC)
+#include "platform/globals.h"
+
+#if !defined(DART_USE_TCMALLOC) || defined(PRODUCT)
#include "vm/malloc_hooks.h"
namespace dart {
void MallocHooks::Init() {
zra 2017/01/19 20:15:16 Looks like these definitions didn't get updated af
- // TODO(bkonyi): Implement
+ // Do nothing.
+}
+
+
+void MallocHooks::TearDown() {
+ // Do nothing.
+}
+
+
+void MallocHooks::Reset() {
+ // Do nothing.
+}
+
+
+uintptr_t MallocHooks::allocation_count() {
+ return 0;
+}
+
+
+uintptr_t MallocHooks::heap_allocated_memory_in_bytes() {
+ return 0;
}
} // namespace dart
-#endif // defined(DART_USE_TCMALLOC)
+#endif // defined(DART_USE_TCMALLOC) || defined(PRODUCT)
« no previous file with comments | « runtime/vm/malloc_hooks_test.cc ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698