#include "config.h"#include <new>#include <stdio.h>#include <stddef.h>#include <stdint.h>#include <stdlib.h>#include <string.h>#include <pthread.h>#include <unistd.h>#include <errno.h>#include <stdarg.h>#include "base/commandlineflags.h"#include "google/malloc_hook.h"#include "google/malloc_extension.h"#include "internal_logging.h"#include "internal_spinlock.h"#include "pagemap.h"#include "system-alloc.h"#include "maybe_threads.h"#include <inttypes.h>

構成 | |
| struct | TCEntry |
| class | PageHeapAllocator< T > |
| struct | Span |
| struct | StackTrace |
| class | MapSelector< BITS > |
| class | MapSelector< 32 > |
| class | TCMalloc_PageHeap |
| class | TCMalloc_ThreadCache_FreeList |
| class | TCMalloc_ThreadCache |
| class | TCMalloc_Central_FreeList |
| class | TCMalloc_Central_FreeListPadded |
| struct | TCMallocStats |
| class | TCMallocImplementation |
| class | TCMallocGuard |
マクロ定義 | |
| #define | __STDC_FORMAT_MACROS |
| #define | LLU PRIu64 |
| #define | Event(s, o, v) ((void) 0) |
| #define | pageheap ((TCMalloc_PageHeap*) pageheap_memory) |
| #define | OP_THROWNOTHING |
| #define | OP_THROWBADALLOC |
型定義 | |
| typedef uintptr_t | PageID |
| typedef uintptr_t | Length |
関数 | |
| DEFINE_int64 (tcmalloc_sample_parameter, 262147,"Twice the approximate gap between sampling actions."" Must be a prime number. Otherwise will be rounded up to a "" larger prime number") | |
| static int | LgFloor (size_t n) |
| static void * | SLL_Next (void *t) |
| static void | SLL_SetNext (void *t, void *n) |
| static void | SLL_Push (void **list, void *element) |
| static void * | SLL_Pop (void **list) |
| static void | SLL_PopRange (void **head, int N, void **start, void **end) |
| static void | SLL_PushRange (void **head, void *start, void *end) |
| static size_t | SLL_Size (void *head) |
| static int | SizeClass (size_t size) |
| static size_t | ByteSizeForClass (size_t cl) |
| static int | NumMoveSize (size_t size) |
| static void | InitSizeClasses () |
| static void * | MetaDataAlloc (size_t bytes) |
| static Length | pages (size_t bytes) |
| static size_t | AllocationSize (size_t bytes) |
| static Span * | NewSpan (PageID p, Length len) |
| static void | DeleteSpan (Span *span) |
| static void | DLL_Init (Span *list) |
| static void | DLL_Remove (Span *span) |
| static bool | DLL_IsEmpty (const Span *list) |
| static int | DLL_Length (const Span *list) |
| static void | DLL_Prepend (Span *list, Span *span) |
| static void | DLL_InsertOrdered (Span *list, Span *span) |
| static void | RecordGrowth (size_t growth) |
| static void | ExtractStats (TCMallocStats *r, uint64_t *class_count) |
| static void | DumpStats (TCMalloc_Printer *out, int level) |
| static void | PrintStats (int level) |
| static void ** | DumpStackTraces () |
| static void ** | DumpHeapGrowthStackTraces () |
| static Span * | DoSampledAllocation (size_t size) |
| static void * | do_malloc (size_t size) |
| static void | do_free (void *ptr) |
| static void * | do_memalign (size_t align, size_t size) |
| void * | malloc (size_t size) |
| void | free (void *ptr) |
| void * | calloc (size_t n, size_t elem_size) |
| void | cfree (void *ptr) |
| void * | realloc (void *old_ptr, size_t new_size) |
| static void * | cpp_alloc (size_t size, bool nothrow) |
| void * | operator new (size_t size) OP_THROWBADALLOC |
| void * | operator new (size_t size, const std::nothrow_t &) OP_THROWNOTHING |
| void | operator delete (void *p) OP_THROWNOTHING |
| void | operator delete (void *p, const std::nothrow_t &) OP_THROWNOTHING |
| void * | operator new[] (size_t size) OP_THROWBADALLOC |
| void * | operator new[] (size_t size, const std::nothrow_t &) OP_THROWNOTHING |
| void | operator delete[] (void *p) OP_THROWNOTHING |
| void | operator delete[] (void *p, const std::nothrow_t &) OP_THROWNOTHING |
| void * | memalign (size_t align, size_t size) |
| int | posix_memalign (void **result_ptr, size_t align, size_t size) |
| void * | valloc (size_t size) |
| void * | pvalloc (size_t size) |
| void | malloc_stats (void) |
| int | mallopt (int cmd, int value) |
| void * | __libc_malloc (size_t size) |
| void | __libc_free (void *ptr) |
| void * | __libc_realloc (void *ptr, size_t size) |
| void * | __libc_calloc (size_t n, size_t size) |
| void | __libc_cfree (void *ptr) |
| void * | __libc_memalign (size_t align, size_t s) |
| void * | __libc_valloc (size_t size) |
| void * | __libc_pvalloc (size_t size) |
| int | __posix_memalign (void **r, size_t a, size_t s) |
| static void * | MemalignOverride (size_t align, size_t size, const void *caller) |
変数 | |
| static const size_t | kPageShift = 12 |
| static const size_t | kPageSize = 1 << kPageShift |
| static const size_t | kMaxSize = 8u * kPageSize |
| static const size_t | kAlignShift = 3 |
| static const size_t | kAlignment = 1 << kAlignShift |
| static const size_t | kNumClasses = 170 |
| static const size_t | kPageMapBigAllocationThreshold = 128 << 20 |
| static const int | kMinSystemAlloc = 1 << (20 - kPageShift) |
| static int | num_objects_to_move [kNumClasses] |
| static const int | kMaxFreeListLength = 256 |
| static const size_t | kMinThreadCacheSize = kMaxSize * 2 |
| static const size_t | kMaxThreadCacheSize = 2 << 20 |
| static const size_t | kDefaultOverallThreadCacheSize = 16 << 20 |
| static const size_t | kMaxPages = kMinSystemAlloc |
| static unsigned int | primes_list [] |
| static size_t | sample_period = 262147 |
| static SpinLock | sample_period_lock = SPINLOCK_INITIALIZER |
| static const int | kSizeBits = 8 * sizeof(size_t) |
| static unsigned char | size_base [kSizeBits] |
| static unsigned char | size_shift [kSizeBits] |
| static size_t | class_to_size [kNumClasses] |
| static size_t | class_to_pages [kNumClasses] |
| static const int | kNumTransferEntries = kNumClasses |
| static uint64_t | metadata_system_bytes = 0 |
| static PageHeapAllocator< Span > | span_allocator |
| static const int | kMaxStackDepth = 31 |
| static PageHeapAllocator < StackTrace > | stacktrace_allocator |
| static Span | sampled_objects |
| static StackTrace * | growth_stacks = NULL |
| static TCMalloc_Central_FreeListPadded | central_cache [kNumClasses] |
| static SpinLock | pageheap_lock = SPINLOCK_INITIALIZER |
| static char | pageheap_memory [sizeof(TCMalloc_PageHeap)] |
| static bool | phinited = false |
| static bool | tsd_inited = false |
| static pthread_key_t | heap_key |
| static PageHeapAllocator < TCMalloc_ThreadCache > | threadheap_allocator |
| static TCMalloc_ThreadCache * | thread_heaps = NULL |
| static int | thread_heap_count = 0 |
| static size_t | overall_thread_cache_size = kDefaultOverallThreadCacheSize |
| static volatile size_t | per_thread_cache_size = kMaxThreadCacheSize |
| static TCMallocGuard | module_enter_exit_hook |
| static SpinLock | set_new_handler_lock = SPINLOCK_INITIALIZER |
| static size_t | pagesize = 0 |
| void *(* | __memalign_hook )(size_t, size_t, const void *) = MemalignOverride |
| #define __STDC_FORMAT_MACROS |
tcmalloc-0.8/tcmalloc.cc の 92 行で定義されています。
| #define Event | ( | s, | |||
| o, | |||||
| v | ) | ((void) 0) |
| #define LLU PRIu64 |
| #define OP_THROWBADALLOC |
tcmalloc-0.8/tcmalloc.cc の 2410 行で定義されています。
| #define OP_THROWNOTHING |
tcmalloc-0.8/tcmalloc.cc の 2409 行で定義されています。
| #define pageheap ((TCMalloc_PageHeap*) pageheap_memory) |
tcmalloc-0.8/tcmalloc.cc の 1268 行で定義されています。
参照元 CheckCachedSizeClass(), do_free(), do_malloc(), do_memalign(), DoSampledAllocation(), DumpStats(), ExtractStats(), TCMallocImplementation::GetNumericProperty(), TCMalloc_Central_FreeList::Populate(), realloc(), TCMallocImplementation::ReleaseFreeMemory(), TCMalloc_Central_FreeList::ReleaseToSpans(), と SpanToMallocResult().
| typedef uintptr_t Length |
tcmalloc-0.8/tcmalloc.cc の 503 行で定義されています。
| typedef uintptr_t PageID |
tcmalloc-0.8/tcmalloc.cc の 500 行で定義されています。
| void* __libc_calloc | ( | size_t | n, | |
| size_t | size | |||
| ) |
| void __libc_cfree | ( | void * | ptr | ) |
| void __libc_free | ( | void * | ptr | ) |
| void* __libc_malloc | ( | size_t | size | ) |
| void* __libc_memalign | ( | size_t | align, | |
| size_t | s | |||
| ) |
| void* __libc_pvalloc | ( | size_t | size | ) |
| void* __libc_realloc | ( | void * | ptr, | |
| size_t | size | |||
| ) |
| void* __libc_valloc | ( | size_t | size | ) |
| int __posix_memalign | ( | void ** | r, | |
| size_t | a, | |||
| size_t | s | |||
| ) |
| static size_t AllocationSize | ( | size_t | bytes | ) | [static] |
tcmalloc-0.8/tcmalloc.cc の 512 行で定義されています。
参照先 ByteSizeForClass(), kMaxSize, kPageShift, pages(), と SizeClass().
参照元 realloc().
| static size_t ByteSizeForClass | ( | size_t | cl | ) | [inline, static] |
tcmalloc-0.8/tcmalloc.cc の 307 行で定義されています。
参照先 class_to_size.
参照元 TCMalloc_ThreadCache::Allocate(), AllocationSize(), TCMalloc_ThreadCache::Deallocate(), DumpStats(), ExtractStats(), TCMalloc_ThreadCache::FetchFromCentralCache(), InitSizeClasses(), TCMalloc_Central_FreeList::Populate(), TCMalloc_ThreadCache::Print(), realloc(), TCMalloc_ThreadCache::ReleaseToCentralCache(), と TCMalloc_Central_FreeList::ReleaseToSpans().
| void * calloc | ( | size_t | n, | |
| size_t | elem_size | |||
| ) |
tcmalloc-0.8/tcmalloc.cc の 2350 行で定義されています。
参照先 do_malloc(), と MallocHook::InvokeNewHook().
参照元 __libc_calloc().
| void cfree | ( | void * | ptr | ) |
tcmalloc-0.8/tcmalloc.cc の 2363 行で定義されています。
参照先 do_free(), と MallocHook::InvokeDeleteHook().
参照元 __libc_cfree().
| static void* cpp_alloc | ( | size_t | size, | |
| bool | nothrow | |||
| ) | [inline, static] |
tcmalloc-0.8/tcmalloc.cc の 2418 行で定義されています。
参照先 do_malloc(), と MallocHook::InvokeNewHook().
参照元 operator new(), と operator new[]().
| DEFINE_int64 | ( | tcmalloc_sample_parameter | , | |
| 262147 | , | |||
| "Twice the approximate gap between sampling actions."" Must be a prime number. Otherwise will be rounded up to a "" larger prime number" | ||||
| ) |
| static void DeleteSpan | ( | Span * | span | ) | [static] |
| static void DLL_Init | ( | Span * | list | ) | [static] |
tcmalloc-0.8/tcmalloc.cc の 622 行で定義されています。
参照先 ASSERT, Span::next, Span::prev, と Span::start.
参照元 TCMalloc_PageHeap::Carve(), と TCMalloc_PageHeap::Delete().
| static bool DLL_IsEmpty | ( | const Span * | list | ) | [inline, static] |
| static int DLL_Length | ( | const Span * | list | ) | [static] |
tcmalloc-0.8/tcmalloc.cc の 613 行で定義されています。
参照先 ASSERT, Span::next, と Span::prev.
参照元 TCMalloc_PageHeap::Carve(), TCMalloc_PageHeap::Delete(), DoSampledAllocation(), TCMalloc_Central_FreeList::FetchFromSpans(), TCMalloc_PageHeap::IncrementalScavenge(), TCMalloc_Central_FreeList::Populate(), ReleaseFreeList(), と TCMalloc_Central_FreeList::ReleaseToSpans().
| static void DLL_Remove | ( | Span * | span | ) | [static] |
| static void do_free | ( | void * | ptr | ) | [inline, static] |
tcmalloc-0.8/tcmalloc.cc の 2181 行で定義されています。
参照先 ASSERT, TCMalloc_ThreadCache::Deallocate(), DLL_Remove(), Span::free, TCMalloc_ThreadCache::GetCacheIfPresent(), TCMalloc_Central_FreeList::InsertRange(), kPageShift, kPageSize, TCMallocDebug::kVerbose, TCMallocDebug::level, MESSAGE, Span::objects, pageheap, Span::sample, Span::sizeclass, SLL_SetNext(), stacktrace_allocator, と Span::start.
参照元 cfree(), free(), operator delete(), operator delete[](), realloc(), と TCMallocGuard::TCMallocGuard().
| static void* do_malloc | ( | size_t | size | ) | [inline, static] |
tcmalloc-0.8/tcmalloc.cc の 2154 行で定義されています。
参照先 TCMalloc_ThreadCache::Allocate(), DoSampledAllocation(), TCMalloc_ThreadCache::GetCache(), kMaxSize, kPageShift, TCMallocDebug::kVerbose, TCMallocDebug::level, MESSAGE, pageheap, pages(), PRIuS, TCMalloc_ThreadCache::SampleAllocation(), と Span::start.
参照元 calloc(), cpp_alloc(), malloc(), realloc(), と TCMallocGuard::TCMallocGuard().
| static void* do_memalign | ( | size_t | align, | |
| size_t | size | |||
| ) | [static] |
tcmalloc-0.8/tcmalloc.cc の 2222 行で定義されています。
参照先 TCMalloc_ThreadCache::Allocate(), ASSERT, class_to_size, TCMalloc_ThreadCache::GetCache(), TCMalloc_ThreadCache::InitModule(), kMaxSize, kNumClasses, kPageShift, kPageSize, Span::length, pageheap, pages(), SizeClass(), と Span::start.
参照元 memalign(), MemalignOverride(), posix_memalign(), pvalloc(), と valloc().
| static Span* DoSampledAllocation | ( | size_t | size | ) | [static] |
tcmalloc-0.8/tcmalloc.cc の 2128 行で定義されています。
参照先 StackTrace::depth, DLL_Prepend(), Span::objects, pageheap, pages(), Span::sample, sampled_objects, StackTrace::size, と stacktrace_allocator.
参照元 do_malloc().
| static void** DumpHeapGrowthStackTraces | ( | ) | [static] |
| static void** DumpStackTraces | ( | ) | [static] |
tcmalloc-0.8/tcmalloc.cc の 1953 行で定義されています。
参照先 ASSERT, StackTrace::depth, MESSAGE, Span::next, sampled_objects, StackTrace::size, と StackTrace::stack.
| static void DumpStats | ( | TCMalloc_Printer * | out, | |
| int | level | |||
| ) | [static] |
tcmalloc-0.8/tcmalloc.cc の 1891 行で定義されています。
参照先 ByteSizeForClass(), TCMallocStats::central_bytes, ExtractStats(), PageHeapAllocator< T >::inuse(), kNumClasses, LLU, TCMallocStats::metadata_bytes, pageheap, TCMallocStats::pageheap_bytes, TCMalloc_Printer::printf(), PRIuS, TCMallocStats::system_bytes, TCMallocStats::thread_bytes, と TCMallocStats::transfer_bytes.
| static void ExtractStats | ( | TCMallocStats * | r, | |
| uint64_t * | class_count | |||
| ) | [static] |
tcmalloc-0.8/tcmalloc.cc の 1856 行で定義されています。
参照先 ByteSizeForClass(), TCMallocStats::central_bytes, kNumClasses, TCMalloc_Central_FreeList::length(), length, TCMallocStats::metadata_bytes, metadata_system_bytes, pageheap, TCMallocStats::pageheap_bytes, TCMallocStats::system_bytes, TCMalloc_Central_FreeList::tc_length(), TCMallocStats::thread_bytes, と TCMallocStats::transfer_bytes.
参照元 DumpStats(), と TCMallocImplementation::GetNumericProperty().
| void free | ( | void * | ptr | ) |
| static void InitSizeClasses | ( | ) | [static] |
tcmalloc-0.8/tcmalloc.cc の 336 行で定義されています。
参照先 ByteSizeForClass(), class_to_pages, class_to_size, kAlignment, kAlignShift, kMaxSize, kNumClasses, kPageShift, kPageSize, LgFloor(), MESSAGE, num_objects_to_move, NumMoveSize(), PRIuS, size_base, size_shift, と SizeClass().
| static int LgFloor | ( | size_t | n | ) | [inline, static] |
| void * malloc | ( | size_t | size | ) |
| void malloc_stats | ( | void | ) |
| int mallopt | ( | int | cmd, | |
| int | value | |||
| ) |
tcmalloc-0.8/tcmalloc.cc の 2541 行で定義されています。
| void * memalign | ( | size_t | align, | |
| size_t | size | |||
| ) |
tcmalloc-0.8/tcmalloc.cc の 2495 行で定義されています。
参照先 do_memalign(), と MallocHook::InvokeNewHook().
参照元 __libc_memalign().
| static void* MemalignOverride | ( | size_t | align, | |
| size_t | size, | |||
| const void * | caller | |||
| ) | [static] |
| static void* MetaDataAlloc | ( | size_t | bytes | ) | [static] |
| static int NumMoveSize | ( | size_t | size | ) | [static] |
| void operator delete | ( | void * | p, | |
| const std::nothrow_t & | ||||
| ) |
| void operator delete | ( | void * | p | ) |
| void operator delete[] | ( | void * | p, | |
| const std::nothrow_t & | ||||
| ) |
| void operator delete[] | ( | void * | p | ) |
| void * operator new | ( | size_t | size, | |
| const std::nothrow_t & | ||||
| ) |
| void * operator new | ( | size_t | size | ) |
| void * operator new[] | ( | size_t | size, | |
| const std::nothrow_t & | ||||
| ) |
| void * operator new[] | ( | size_t | size | ) |
| static Length pages | ( | size_t | bytes | ) | [inline, static] |
tcmalloc-0.8/tcmalloc.cc の 506 行で定義されています。
参照先 kPageShift, と kPageSize.
参照元 AllocationSize(), do_malloc(), do_memalign(), と DoSampledAllocation().
| int posix_memalign | ( | void ** | result_ptr, | |
| size_t | align, | |||
| size_t | size | |||
| ) |
tcmalloc-0.8/tcmalloc.cc の 2501 行で定義されています。
参照先 do_memalign(), と MallocHook::InvokeNewHook().
参照元 __posix_memalign().
| static void PrintStats | ( | int | level | ) | [static] |
tcmalloc-0.8/tcmalloc.cc の 1944 行で定義されています。
参照先 DumpStats().
参照元 do_malloc_stats(), malloc_stats(), と TCMallocGuard::~TCMallocGuard().
| void * pvalloc | ( | size_t | size | ) |
tcmalloc-0.8/tcmalloc.cc の 2528 行で定義されています。
参照先 do_memalign(), と MallocHook::InvokeNewHook().
参照元 __libc_pvalloc().
| void * realloc | ( | void * | old_ptr, | |
| size_t | new_size | |||
| ) |
| static void RecordGrowth | ( | size_t | growth | ) | [static] |
tcmalloc-0.8/tcmalloc.cc の 958 行で定義されています。
参照先 StackTrace::depth, PageHeapAllocator< T >::New(), StackTrace::size, と StackTrace::stack.
| static int SizeClass | ( | size_t | size | ) | [inline, static] |
tcmalloc-0.8/tcmalloc.cc の 299 行で定義されています。
参照先 LgFloor(), size_base, と size_shift.
参照元 TCMalloc_ThreadCache::Allocate(), AllocationSize(), do_memalign(), と InitSizeClasses().
| static void* SLL_Next | ( | void * | t | ) | [inline, static] |
tcmalloc-0.8/tcmalloc.cc の 239 行で定義されています。
参照元 TCMalloc_Central_FreeList::ReleaseListToSpans(), SLL_Pop(), SLL_PopRange(), と SLL_Size().
| static void* SLL_Pop | ( | void ** | list | ) | [inline, static] |
| static void SLL_PopRange | ( | void ** | head, | |
| int | N, | |||
| void ** | start, | |||
| void ** | end | |||
| ) | [inline, static] |
| static void SLL_Push | ( | void ** | list, | |
| void * | element | |||
| ) | [inline, static] |
tcmalloc-0.8/tcmalloc.cc の 247 行で定義されています。
参照先 SLL_SetNext().
参照元 TCMalloc_ThreadCache_FreeList::Push(), と TCMalloc_Central_FreeList::RemoveRange().
| static void SLL_PushRange | ( | void ** | head, | |
| void * | start, | |||
| void * | end | |||
| ) | [inline, static] |
| static void SLL_SetNext | ( | void * | t, | |
| void * | n | |||
| ) | [inline, static] |
tcmalloc-0.8/tcmalloc.cc の 243 行で定義されています。
参照元 do_free(), TCMalloc_Central_FreeList::RemoveRange(), SLL_PopRange(), SLL_Push(), と SLL_PushRange().
| static size_t SLL_Size | ( | void * | head | ) | [inline, static] |
| void * valloc | ( | size_t | size | ) |
tcmalloc-0.8/tcmalloc.cc の 2520 行で定義されています。
参照先 do_memalign(), と MallocHook::InvokeNewHook().
参照元 __libc_valloc().
| void*(* __memalign_hook)(size_t, size_t, const void *) = MemalignOverride |
tcmalloc-0.8/tcmalloc.cc の 1259 行で定義されています。
size_t class_to_pages[kNumClasses] [static] |
tcmalloc-0.8/tcmalloc.cc の 186 行で定義されています。
参照元 InitSizeClasses(), と TCMalloc_Central_FreeList::Populate().
size_t class_to_size[kNumClasses] [static] |
tcmalloc-0.8/tcmalloc.cc の 183 行で定義されています。
StackTrace* growth_stacks = NULL [static] |
pthread_key_t heap_key [static] |
tcmalloc-0.8/tcmalloc.cc の 1398 行で定義されています。
const size_t kAlignment = 1 << kAlignShift [static] |
const size_t kAlignShift = 3 [static] |
const size_t kDefaultOverallThreadCacheSize = 16 << 20 [static] |
tcmalloc-0.8/tcmalloc.cc の 144 行で定義されています。
const int kMaxFreeListLength = 256 [static] |
const size_t kMaxPages = kMinSystemAlloc [static] |
const size_t kMaxSize = 8u * kPageSize [static] |
tcmalloc-0.8/tcmalloc.cc の 108 行で定義されています。
参照元 TCMalloc_ThreadCache::Allocate(), AllocationSize(), do_malloc(), do_memalign(), と InitSizeClasses().
const int kMaxStackDepth = 31 [static] |
const size_t kMaxThreadCacheSize = 2 << 20 [static] |
const int kMinSystemAlloc = 1 << (20 - kPageShift) [static] |
const size_t kMinThreadCacheSize = kMaxSize * 2 [static] |
const size_t kNumClasses = 170 [static] |
tcmalloc-0.8/tcmalloc.cc の 111 行で定義されています。
参照元 TCMalloc_ThreadCache::Cleanup(), do_memalign(), DumpStats(), TCMalloc_Central_FreeList::EvictRandomSizeClass(), ExtractStats(), TCMalloc_ThreadCache::Init(), TCMalloc_ThreadCache::InitModule(), InitSizeClasses(), TCMalloc_ThreadCache::Print(), と TCMalloc_ThreadCache::Scavenge().
const int kNumTransferEntries = kNumClasses [static] |
const size_t kPageMapBigAllocationThreshold = 128 << 20 [static] |
const size_t kPageShift = 12 [static] |
tcmalloc-0.8/tcmalloc.cc の 106 行で定義されています。
参照元 AllocationSize(), do_free(), do_malloc(), do_memalign(), TCMalloc_PageHeap::Dump(), TCMalloc_PageHeap::FreeBytes(), TCMalloc_PageHeap::GrowHeap(), InitSizeClasses(), pages(), TCMalloc_Central_FreeList::Populate(), realloc(), と TCMalloc_Central_FreeList::ReleaseToSpans().
const size_t kPageSize = 1 << kPageShift [static] |
tcmalloc-0.8/tcmalloc.cc の 107 行で定義されています。
参照元 do_free(), do_memalign(), TCMalloc_PageHeap::Dump(), TCMalloc_PageHeap::GrowHeap(), InitSizeClasses(), と pages().
const int kSizeBits = 8 * sizeof(size_t) [static] |
tcmalloc-0.8/tcmalloc.cc の 178 行で定義されています。
uint64_t metadata_system_bytes = 0 [static] |
TCMallocGuard module_enter_exit_hook [static] |
tcmalloc-0.8/tcmalloc.cc の 2327 行で定義されています。
int num_objects_to_move[kNumClasses] [static] |
tcmalloc-0.8/tcmalloc.cc の 130 行で定義されています。
参照元 TCMalloc_ThreadCache::Deallocate(), TCMalloc_ThreadCache::FetchFromCentralCache(), InitSizeClasses(), TCMalloc_Central_FreeList::InsertRange(), TCMalloc_ThreadCache::ReleaseToCentralCache(), TCMalloc_Central_FreeList::RemoveRange(), と TCMalloc_Central_FreeList::tc_length().
size_t overall_thread_cache_size = kDefaultOverallThreadCacheSize [static] |
SpinLock pageheap_lock = SPINLOCK_INITIALIZER [static] |
tcmalloc-0.8/tcmalloc.cc の 1262 行で定義されています。
参照元 TCMalloc_ThreadCache::DeleteCache(), do_free(), do_malloc(), do_memalign(), DoSampledAllocation(), DumpHeapGrowthStackTraces(), DumpStackTraces(), DumpStats(), ExtractStats(), TCMallocImplementation::GetNumericProperty(), TCMallocImplementation::ReleaseFreeMemory(), と TCMallocImplementation::SetNumericProperty().
char pageheap_memory[sizeof(TCMalloc_PageHeap)] [static] |
size_t pagesize = 0 [static] |
tcmalloc-0.8/tcmalloc.cc の 2518 行で定義されています。
volatile size_t per_thread_cache_size = kMaxThreadCacheSize [static] |
bool phinited = false [static] |
unsigned int primes_list[] [static] |
初期値:
{
32771, 65537, 131101, 262147, 524309, 1048583,
2097169, 4194319, 8388617, 16777259, 33554467 }
tcmalloc-0.8/tcmalloc.cc の 151 行で定義されています。
size_t sample_period = 262147 [static] |
SpinLock sample_period_lock = SPINLOCK_INITIALIZER [static] |
Span sampled_objects [static] |
tcmalloc-0.8/tcmalloc.cc の 648 行で定義されています。
参照元 DoSampledAllocation(), DumpStackTraces(), と TCMalloc_ThreadCache::InitModule().
SpinLock set_new_handler_lock = SPINLOCK_INITIALIZER [static] |
unsigned char size_shift[kSizeBits] [static] |
PageHeapAllocator<Span> span_allocator [static] |
tcmalloc-0.8/tcmalloc.cc の 555 行で定義されています。
PageHeapAllocator<StackTrace> stacktrace_allocator [static] |
tcmalloc-0.8/tcmalloc.cc の 647 行で定義されています。
参照元 do_free(), DoSampledAllocation(), と TCMalloc_ThreadCache::InitModule().
tcmalloc-0.8/tcmalloc.cc の 1398 行で定義されています。
int thread_heap_count = 0 [static] |
TCMalloc_ThreadCache* thread_heaps = NULL [static] |
tcmalloc-0.8/tcmalloc.cc の 1282 行で定義されています。
tcmalloc-0.8/tcmalloc.cc の 1279 行で定義されています。
bool tsd_inited = false [static] |
1.5.6