Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: third_party/tcmalloc/chromium/src/memory_region_map.h

Issue 9320005: [NOT TO COMMIT!] Replace third_party/tcmalloc/chromium with tcmalloc r136 (the latest). (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/tcmalloc/chromium/src/memory_region_map.h
diff --git a/third_party/tcmalloc/chromium/src/memory_region_map.h b/third_party/tcmalloc/chromium/src/memory_region_map.h
index 09561ce1ac48ca6589db43a0e5e690266d5314c1..988ea707375aed124136fe0bb7db105dbb2952a7 100644
--- a/third_party/tcmalloc/chromium/src/memory_region_map.h
+++ b/third_party/tcmalloc/chromium/src/memory_region_map.h
@@ -252,6 +252,10 @@ class MemoryRegionMap {
static RegionIterator BeginRegionLocked();
static RegionIterator EndRegionLocked();
+ // Return the accumulated sizes of mapped and unmapped regions.
+ static int64 MapSize() { return map_size_; }
+ static int64 UnmapSize() { return unmap_size_; }
+
// Effectively private type from our .cc =================================
// public to let us declare global objects:
union RegionSetRep;
@@ -286,6 +290,11 @@ class MemoryRegionMap {
// The thread id of the thread that's inside the recursive lock.
static pthread_t lock_owner_tid_;
+ // Total size of all mapped pages so far
+ static int64 map_size_;
+ // Total size of all unmapped pages so far
+ static int64 unmap_size_;
+
// helpers ==================================================================
// Helper for FindRegion and FindAndMarkStackRegion:
@@ -319,7 +328,7 @@ class MemoryRegionMap {
static void MremapHook(const void* result, const void* old_addr,
size_t old_size, size_t new_size, int flags,
const void* new_addr);
- static void SbrkHook(const void* result, std::ptrdiff_t increment);
+ static void SbrkHook(const void* result, ptrdiff_t increment);
// Log all memory regions; Useful for debugging only.
// Assumes Lock() is held
« no previous file with comments | « third_party/tcmalloc/chromium/src/memfs_malloc.cc ('k') | third_party/tcmalloc/chromium/src/memory_region_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698