Chromium Code Reviews| Index: Source/wtf/Partitions.cpp |
| diff --git a/Source/wtf/Partitions.cpp b/Source/wtf/Partitions.cpp |
| index 4eba302cc10cb0a1a53ae5be0717046b9547b9e8..d74756ef63764f0efe33b569075f0cee3081301a 100644 |
| --- a/Source/wtf/Partitions.cpp |
| +++ b/Source/wtf/Partitions.cpp |
| @@ -72,6 +72,22 @@ void Partitions::shutdown() |
| (void) m_fastMallocAllocator.shutdown(); |
| } |
| +void Partitions::releaseFreeMemory() |
| +{ |
| + ASSERT(isMainThread()); |
| + |
| + spinLockLock(&getBufferPartition()->lock); |
|
haraken
2015/06/03 11:39:00
Can we move this lock into partitionPurgeMemory?
ssid
2015/06/03 11:45:31
1. PartitionRootBase is a struct and partitionPurg
|
| + partitionPurgeMemory(getBufferPartition()); |
| + spinLockUnlock(&getBufferPartition()->lock); |
| + |
| + spinLockLock(&getFastMallocPartition()->lock); |
| + partitionPurgeMemory(getFastMallocPartition()); |
| + spinLockUnlock(&getFastMallocPartition()->lock); |
| + |
| + partitionPurgeMemory(getObjectModelPartition()); |
| + partitionPurgeMemory(getRenderingPartition()); |
| +} |
| + |
| void Partitions::reportMemoryUsageHistogram() |
| { |
| static size_t supportedMaxSizeInMB = 4 * 1024; |