OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef TOOLS_ANDROID_HEAP_PROFILER_HEAP_PROFILER_H_ | 5 #ifndef TOOLS_ANDROID_HEAP_PROFILER_HEAP_PROFILER_H_ |
6 #define TOOLS_ANDROID_HEAP_PROFILER_HEAP_PROFILER_H_ | 6 #define TOOLS_ANDROID_HEAP_PROFILER_HEAP_PROFILER_H_ |
7 | 7 |
| 8 #include <stddef.h> |
8 #include <stdint.h> | 9 #include <stdint.h> |
| 10 |
9 #include "third_party/bsdtrees/tree.h" | 11 #include "third_party/bsdtrees/tree.h" |
10 | 12 |
11 #define HEAP_PROFILER_MAGIC_MARKER 0x42beef42L | 13 #define HEAP_PROFILER_MAGIC_MARKER 0x42beef42L |
12 #define HEAP_PROFILER_MAX_DEPTH 12 | 14 #define HEAP_PROFILER_MAX_DEPTH 12 |
13 | 15 |
14 // The allocation is a result of a system malloc() invocation. | 16 // The allocation is a result of a system malloc() invocation. |
15 #define HEAP_PROFILER_FLAGS_MALLOC 1 | 17 #define HEAP_PROFILER_FLAGS_MALLOC 1 |
16 | 18 |
17 // The allocation is a result of a mmap() invocation. | 19 // The allocation is a result of a mmap() invocation. |
18 #define HEAP_PROFILER_FLAGS_MMAP 2 // Allocation performed through mmap. | 20 #define HEAP_PROFILER_FLAGS_MMAP 2 // Allocation performed through mmap. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 void heap_profiler_free(void* addr, size_t size, uint32_t* old_flags); | 83 void heap_profiler_free(void* addr, size_t size, uint32_t* old_flags); |
82 | 84 |
83 // Cleans up the HeapStats and all the internal data structures. | 85 // Cleans up the HeapStats and all the internal data structures. |
84 void heap_profiler_cleanup(void); | 86 void heap_profiler_cleanup(void); |
85 | 87 |
86 #ifdef __cplusplus | 88 #ifdef __cplusplus |
87 } | 89 } |
88 #endif | 90 #endif |
89 | 91 |
90 #endif // TOOLS_ANDROID_HEAP_PROFILER_HEAP_PROFILER_H_ | 92 #endif // TOOLS_ANDROID_HEAP_PROFILER_HEAP_PROFILER_H_ |
OLD | NEW |