| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/globals.h" | 5 #include "platform/globals.h" |
| 6 | 6 |
| 7 #if (!defined(DART_USE_TCMALLOC) && !defined(DART_USE_JEMALLOC)) || \ | 7 #if (!defined(DART_USE_TCMALLOC) && !defined(DART_USE_JEMALLOC)) || \ |
| 8 defined(PRODUCT) | 8 defined(PRODUCT) |
| 9 | 9 |
| 10 #include "vm/malloc_hooks.h" | 10 #include "vm/malloc_hooks.h" |
| 11 | 11 |
| 12 namespace dart { | 12 namespace dart { |
| 13 | 13 |
| 14 void MallocHooks::InitOnce() { | 14 void MallocHooks::InitOnce() { |
| 15 // Do nothing. | 15 // Do nothing. |
| 16 } | 16 } |
| 17 | 17 |
| 18 | |
| 19 void MallocHooks::TearDown() { | 18 void MallocHooks::TearDown() { |
| 20 // Do nothing. | 19 // Do nothing. |
| 21 } | 20 } |
| 22 | 21 |
| 23 | |
| 24 bool MallocHooks::ProfilingEnabled() { | 22 bool MallocHooks::ProfilingEnabled() { |
| 25 return false; | 23 return false; |
| 26 } | 24 } |
| 27 | 25 |
| 28 | |
| 29 bool MallocHooks::stack_trace_collection_enabled() { | 26 bool MallocHooks::stack_trace_collection_enabled() { |
| 30 return false; | 27 return false; |
| 31 } | 28 } |
| 32 | 29 |
| 33 | |
| 34 void MallocHooks::set_stack_trace_collection_enabled(bool enabled) { | 30 void MallocHooks::set_stack_trace_collection_enabled(bool enabled) { |
| 35 // Do nothing. | 31 // Do nothing. |
| 36 } | 32 } |
| 37 | 33 |
| 38 | |
| 39 void MallocHooks::ResetStats() { | 34 void MallocHooks::ResetStats() { |
| 40 // Do nothing. | 35 // Do nothing. |
| 41 } | 36 } |
| 42 | 37 |
| 43 | |
| 44 bool MallocHooks::Active() { | 38 bool MallocHooks::Active() { |
| 45 return false; | 39 return false; |
| 46 } | 40 } |
| 47 | 41 |
| 48 | |
| 49 void MallocHooks::PrintToJSONObject(JSONObject* jsobj) { | 42 void MallocHooks::PrintToJSONObject(JSONObject* jsobj) { |
| 50 // Do nothing. | 43 // Do nothing. |
| 51 } | 44 } |
| 52 | 45 |
| 53 | |
| 54 Sample* MallocHooks::GetSample(const void* ptr) { | 46 Sample* MallocHooks::GetSample(const void* ptr) { |
| 55 return NULL; | 47 return NULL; |
| 56 } | 48 } |
| 57 | 49 |
| 58 | |
| 59 intptr_t MallocHooks::allocation_count() { | 50 intptr_t MallocHooks::allocation_count() { |
| 60 return 0; | 51 return 0; |
| 61 } | 52 } |
| 62 | 53 |
| 63 | |
| 64 intptr_t MallocHooks::heap_allocated_memory_in_bytes() { | 54 intptr_t MallocHooks::heap_allocated_memory_in_bytes() { |
| 65 return 0; | 55 return 0; |
| 66 } | 56 } |
| 67 | 57 |
| 68 } // namespace dart | 58 } // namespace dart |
| 69 | 59 |
| 70 #endif // !defined(DART_USE_TCMALLOC) && ... | 60 #endif // !defined(DART_USE_TCMALLOC) && ... |
| OLD | NEW |