Index: third_party/tcmalloc/chromium/src/malloc_extension.cc |
=================================================================== |
--- third_party/tcmalloc/chromium/src/malloc_extension.cc (revision 148994) |
+++ third_party/tcmalloc/chromium/src/malloc_extension.cc (working copy) |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2005, Google Inc. |
+// Copyright (c) 2012, Google Inc. |
// All rights reserved. |
// |
// Redistribution and use in source and binary forms, with or without |
@@ -50,6 +50,7 @@ |
#include "gperftools/malloc_extension.h" |
#include "gperftools/malloc_extension_c.h" |
#include "maybe_threads.h" |
+#include "thread_cache.h" |
using STL_NAMESPACE::string; |
using STL_NAMESPACE::vector; |
@@ -220,6 +221,10 @@ |
} |
} |
+unsigned int MallocExtension::GetBytesAllocatedOnCurrentThread() { |
+ return tcmalloc::ThreadCache::GetBytesAllocatedOnCurrentThread(); |
+} |
+ |
// ----------------------------------------------------------------------- |
// Heap sampling support |
// ----------------------------------------------------------------------- |