| Index: third_party/tcmalloc/chromium/src/thread_cache.cc
|
| ===================================================================
|
| --- third_party/tcmalloc/chromium/src/thread_cache.cc (revision 121705)
|
| +++ third_party/tcmalloc/chromium/src/thread_cache.cc (working copy)
|
| @@ -103,6 +103,7 @@
|
|
|
| void ThreadCache::Init(pthread_t tid) {
|
| size_ = 0;
|
| + total_bytes_allocated_ = 0;
|
|
|
| max_size_ = 0;
|
| IncreaseCacheLimitLocked();
|
| @@ -303,6 +304,11 @@
|
| return sampler_.GetSamplePeriod();
|
| }
|
|
|
| +// static
|
| +unsigned int ThreadCache::GetBytesAllocatedOnCurrentThread() {
|
| + return ThreadCache::GetThreadHeap()->GetTotalBytesAllocated();
|
| +}
|
| +
|
| void ThreadCache::InitModule() {
|
| SpinLockHolder h(Static::pageheap_lock());
|
| if (!phinited) {
|
|
|