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

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, 7 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/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);
@@ -257,7 +260,7 @@
// TODO(jar): We need a commit that automatically tallies metadata_bytes.
jar (doing other things) 2012/06/04 04:31:28 Should we remove this TODO now?
kaiwang 2012/06/04 18:30:52 Done. It's not exactly what I did. But I also feel
TCMalloc_SystemCommit(start, length);
- tcmalloc::increment_metadata_system_bytes(length);
+ tcmalloc::update_metadata_unmapped_bytes(-length);
#ifndef NDEBUG
result = VirtualQuery(start, &info, sizeof(info));

Powered by Google App Engine
This is Rietveld 408576698