OLD | NEW |
1 // Copyright (c) 2005, Google Inc. | 1 // Copyright (c) 2005, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 #include <google/malloc_hook.h> // for MallocHook | 118 #include <google/malloc_hook.h> // for MallocHook |
119 #include "base/basictypes.h" // for int64 | 119 #include "base/basictypes.h" // for int64 |
120 #include "base/commandlineflags.h" // for RegisterFlagValidator, etc | 120 #include "base/commandlineflags.h" // for RegisterFlagValidator, etc |
121 #include "base/dynamic_annotations.h" // for RunningOnValgrind | 121 #include "base/dynamic_annotations.h" // for RunningOnValgrind |
122 #include "base/spinlock.h" // for SpinLockHolder | 122 #include "base/spinlock.h" // for SpinLockHolder |
123 #include "central_freelist.h" // for CentralFreeListPadded | 123 #include "central_freelist.h" // for CentralFreeListPadded |
124 #include "common.h" // for StackTrace, kPageShift, etc | 124 #include "common.h" // for StackTrace, kPageShift, etc |
125 #include "free_list.h" // for FL_Init | 125 #include "free_list.h" // for FL_Init |
126 #include "internal_logging.h" // for ASSERT, TCMalloc_Printer, etc | 126 #include "internal_logging.h" // for ASSERT, TCMalloc_Printer, etc |
127 #include "malloc_hook-inl.h" // for MallocHook::InvokeNewHook, etc | 127 #include "malloc_hook-inl.h" // for MallocHook::InvokeNewHook, etc |
| 128 #include "metadata_encode.h" |
128 #include "page_heap.h" // for PageHeap, PageHeap::Stats | 129 #include "page_heap.h" // for PageHeap, PageHeap::Stats |
129 #include "page_heap_allocator.h" // for PageHeapAllocator | 130 #include "page_heap_allocator.h" // for PageHeapAllocator |
130 #include "span.h" // for Span, DLL_Prepend, etc | 131 #include "span.h" // for Span, DLL_Prepend, etc |
131 #include "stack_trace_table.h" // for StackTraceTable | 132 #include "stack_trace_table.h" // for StackTraceTable |
132 #include "static_vars.h" // for Static | 133 #include "static_vars.h" // for Static |
133 #include "system-alloc.h" // for DumpSystemAllocatorStats, etc | 134 #include "system-alloc.h" // for DumpSystemAllocatorStats, etc |
134 #include "tcmalloc_guard.h" // for TCMallocGuard | 135 #include "tcmalloc_guard.h" // for TCMallocGuard |
135 #include "thread_cache.h" // for ThreadCache | 136 #include "thread_cache.h" // for ThreadCache |
136 | 137 |
137 // We only need malloc.h for struct mallinfo. | 138 // We only need malloc.h for struct mallinfo. |
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1926 *mark = ~allocated_mark; // Distinctively not allocated. | 1927 *mark = ~allocated_mark; // Distinctively not allocated. |
1927 } | 1928 } |
1928 | 1929 |
1929 static void MarkAllocatedRegion(void* ptr) { | 1930 static void MarkAllocatedRegion(void* ptr) { |
1930 if (ptr == NULL) return; | 1931 if (ptr == NULL) return; |
1931 MarkType* mark = GetMarkLocation(ptr); | 1932 MarkType* mark = GetMarkLocation(ptr); |
1932 *mark = GetMarkValue(ptr, mark); | 1933 *mark = GetMarkValue(ptr, mark); |
1933 } | 1934 } |
1934 | 1935 |
1935 #endif // TCMALLOC_VALIDATION | 1936 #endif // TCMALLOC_VALIDATION |
OLD | NEW |