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

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

Issue 10499004: 1. A small fix of Windows VM size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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
« no previous file with comments | « third_party/tcmalloc/chromium/src/common.cc ('k') | third_party/tcmalloc/chromium/src/tcmalloc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/pagemap.h
===================================================================
--- third_party/tcmalloc/chromium/src/pagemap.h (revision 138851)
+++ third_party/tcmalloc/chromium/src/pagemap.h (working copy)
@@ -166,8 +166,11 @@
// TODO(jar): We need a reservation function, but current API to this class
// only provides an allocator.
// Get decommitted memory. We will commit as necessary.
+ size_t size = sizeof(*array_) << BITS;
array_ = reinterpret_cast<void**>(VirtualAlloc(
- NULL, sizeof(*array_) << BITS, MEM_RESERVE, PAGE_READWRITE));
+ NULL, size, MEM_RESERVE, PAGE_READWRITE));
+ tcmalloc::update_metadata_system_bytes(size);
+ tcmalloc::update_metadata_unmapped_bytes(size);
// Make sure we divided LENGTH evenly.
ASSERT(sizeof(committed_) * 8 == (LENGTH * sizeof(*array_)) >> kPageShift);
@@ -255,9 +258,8 @@
ASSERT(info.RegionSize >= length); // Entire length is uncommitted.
#endif
- // TODO(jar): We need a commit that automatically tallies metadata_bytes.
TCMalloc_SystemCommit(start, length);
- tcmalloc::increment_metadata_system_bytes(length);
+ tcmalloc::update_metadata_unmapped_bytes(-length);
#ifndef NDEBUG
result = VirtualQuery(start, &info, sizeof(info));
« no previous file with comments | « third_party/tcmalloc/chromium/src/common.cc ('k') | third_party/tcmalloc/chromium/src/tcmalloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698