1// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5#include "platform/globals.h"
6
7#if defined(PRODUCT) || !defined(DART_USE_TCMALLOC)
8
9#include "vm/malloc_hooks.h"
10
11namespace dart {
12
13void MallocHooks::Init() {
14 // Do nothing.
15}
16
17void MallocHooks::Cleanup() {
18 // Do nothing.
19}
20
21bool MallocHooks::ProfilingEnabled() {
22 return false;
23}
24
25bool MallocHooks::stack_trace_collection_enabled() {
26 return false;
27}
28
29void MallocHooks::set_stack_trace_collection_enabled(bool enabled) {
30 // Do nothing.
31}
32
33void MallocHooks::ResetStats() {
34 // Do nothing.
35}
36
37bool MallocHooks::Active() {
38 return false;
39}
40
41void MallocHooks::PrintToJSONObject(JSONObject* jsobj) {
42 // Do nothing.
43}
44
45Sample* MallocHooks::GetSample(const void* ptr) {
46 return NULL;
47}
48
49intptr_t MallocHooks::allocation_count() {
50 return 0;
51}
52
53intptr_t MallocHooks::heap_allocated_memory_in_bytes() {
54 return 0;
55}
56
57} // namespace dart
58
59#endif // !defined(DART_USE_TCMALLOC) && ...
60