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

Unified Diff: Source/wtf/PartitionAlloc.h

Issue 683043002: PartitionAlloc: Distinguish OOMs where a lot of super pages are not committed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: #if !CPU(64BIT). reinterpret_cast. Created 6 years, 1 month 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 | « no previous file | Source/wtf/PartitionAlloc.cpp » ('j') | Source/wtf/PartitionAlloc.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/PartitionAlloc.h
diff --git a/Source/wtf/PartitionAlloc.h b/Source/wtf/PartitionAlloc.h
index 51430004a09483d44187abd040cf4249159dfabb..efd67033930f3ddb52901dc7458e6b803065ebff 100644
--- a/Source/wtf/PartitionAlloc.h
+++ b/Source/wtf/PartitionAlloc.h
@@ -184,6 +184,13 @@ static const size_t kBitsPerSizet = sizeof(void*) * CHAR_BIT;
// Constants for the memory reclaim logic.
static const size_t kMaxFreeableSpans = 16;
+// If the total size in bytes of allocated but not committed pages exceeds this
+// value (probably it is a "out of virtual address space" crash),
+// a special crash stack trace is generated at |partitionOutOfMemory|.
+// This is to distinguish "out of virtual address space" from
+// "out of physical memory" in crash reports.
+static const size_t kReasonableSizeOfUnusedPages = 1024 * 1024 * 1024; // 1GiB
+
#if ENABLE(ASSERT)
// These two byte values match tcmalloc.
static const unsigned char kUninitializedByte = 0xAB;
@@ -250,6 +257,8 @@ struct PartitionSuperPageExtentEntry {
struct WTF_EXPORT PartitionRootBase {
size_t totalSizeOfCommittedPages;
size_t totalSizeOfSuperPages;
+ size_t totalSizeOfDirectMappedPages;
+ // Invariant: totalSizeOfCommittedPages <= totalSizeOfSuperPages + totalSizeOfDirectMappedPages.
unsigned numBuckets;
unsigned maxAllocation;
bool initialized;
« no previous file with comments | « no previous file | Source/wtf/PartitionAlloc.cpp » ('j') | Source/wtf/PartitionAlloc.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698