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

Side by Side Diff: Source/wtf/Partitions.h

Issue 1155293007: Expose ReleaseFreeMemory to free up memory on memory pressure or idle cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing test calls. 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 unified diff | Download patch
« no previous file with comments | « Source/wtf/PartitionAllocTest.cpp ('k') | Source/wtf/Partitions.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 static size_t totalSizeOfCommittedPages() 81 static size_t totalSizeOfCommittedPages()
82 { 82 {
83 size_t totalSize = 0; 83 size_t totalSize = 0;
84 totalSize += m_fastMallocAllocator.root()->totalSizeOfCommittedPages; 84 totalSize += m_fastMallocAllocator.root()->totalSizeOfCommittedPages;
85 totalSize += m_bufferAllocator.root()->totalSizeOfCommittedPages; 85 totalSize += m_bufferAllocator.root()->totalSizeOfCommittedPages;
86 totalSize += m_objectModelAllocator.root()->totalSizeOfCommittedPages; 86 totalSize += m_objectModelAllocator.root()->totalSizeOfCommittedPages;
87 totalSize += m_renderingAllocator.root()->totalSizeOfCommittedPages; 87 totalSize += m_renderingAllocator.root()->totalSizeOfCommittedPages;
88 return totalSize; 88 return totalSize;
89 } 89 }
90 90
91 static void decommitFreeableMemory();
92
91 static void reportMemoryUsageHistogram(); 93 static void reportMemoryUsageHistogram();
92 94
93 static void dumpMemoryStats(PartitionStatsDumper*); 95 static void dumpMemoryStats(PartitionStatsDumper*);
94 96
95 private: 97 private:
96 static bool s_initialized; 98 static bool s_initialized;
97 static PartitionAllocatorGeneric m_fastMallocAllocator; 99 static PartitionAllocatorGeneric m_fastMallocAllocator;
98 static PartitionAllocatorGeneric m_bufferAllocator; 100 static PartitionAllocatorGeneric m_bufferAllocator;
99 static SizeSpecificPartitionAllocator<3328> m_objectModelAllocator; 101 static SizeSpecificPartitionAllocator<3328> m_objectModelAllocator;
100 static SizeSpecificPartitionAllocator<1024> m_renderingAllocator; 102 static SizeSpecificPartitionAllocator<1024> m_renderingAllocator;
101 static HistogramEnumerationFunction m_histogramEnumeration; 103 static HistogramEnumerationFunction m_histogramEnumeration;
102 }; 104 };
103 105
104 } // namespace WTF 106 } // namespace WTF
105 107
106 #endif // Partitions_h 108 #endif // Partitions_h
OLDNEW
« no previous file with comments | « Source/wtf/PartitionAllocTest.cpp ('k') | Source/wtf/Partitions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698