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

Unified Diff: Source/wtf/PartitionAlloc.h

Issue 1190173003: PartitionAlloc: API changes to support new partitionPurgeMemoryGeneric() mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review feedback. Created 5 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 | « Source/platform/PartitionAllocMemoryDumpProvider.cpp ('k') | Source/wtf/PartitionAlloc.cpp » ('j') | no next file with comments »
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 4fc0d64dae2510baf9b797b93603b5e05e2b9bad..1533a3f31d15b582398c1360eb2c25256573c3f4 100644
--- a/Source/wtf/PartitionAlloc.h
+++ b/Source/wtf/PartitionAlloc.h
@@ -351,7 +351,8 @@ struct PartitionBucketMemoryStats {
uint32_t allocatedPageSize; // Total size the partition page allocated from the system.
uint32_t activeBytes; // Total active bytes used in the bucket.
uint32_t residentBytes; // Total bytes provisioned in the bucket.
- uint32_t freeableBytes; // Total bytes that could be decommitted.
+ uint32_t decommittableBytes; // Total bytes that could be decommitted.
+ uint32_t discardableBytes; // Total bytes that could be discarded.
uint32_t numFullPages; // Number of pages with all slots allocated.
uint32_t numActivePages; // Number of pages that have at least one provisioned slot.
uint32_t numEmptyPages; // Number of pages that are empty but not decommitted.
@@ -369,8 +370,14 @@ WTF_EXPORT void partitionAllocInit(PartitionRoot*, size_t numBuckets, size_t max
WTF_EXPORT bool partitionAllocShutdown(PartitionRoot*);
WTF_EXPORT void partitionAllocGenericInit(PartitionRootGeneric*);
WTF_EXPORT bool partitionAllocGenericShutdown(PartitionRootGeneric*);
-WTF_EXPORT void partitionPurgeMemory(PartitionRoot*);
-WTF_EXPORT void partitionPurgeMemoryGeneric(PartitionRootGeneric*);
+
+enum PartitionPurgeFlags {
+ // Decommitting the ring list of empty pages is reasonably fast.
+ PartitionPurgeDecommitEmptyPages = 1 << 0,
+};
+
+WTF_EXPORT void partitionPurgeMemory(PartitionRoot*, int);
+WTF_EXPORT void partitionPurgeMemoryGeneric(PartitionRootGeneric*, int);
WTF_EXPORT NEVER_INLINE void* partitionAllocSlowPath(PartitionRootBase*, int, size_t, PartitionBucket*);
WTF_EXPORT NEVER_INLINE void partitionFreeSlowPath(PartitionPage*);
« no previous file with comments | « Source/platform/PartitionAllocMemoryDumpProvider.cpp ('k') | Source/wtf/PartitionAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698