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

Side by Side Diff: third_party/WebKit/Source/platform/MemoryPurgeController.cpp

Issue 1881983003: Move PartitionAlloc related things into wtf/allocator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/MemoryPurgeController.h" 5 #include "platform/MemoryPurgeController.h"
6 6
7 #include "base/sys_info.h" 7 #include "base/sys_info.h"
8 #include "platform/TraceEvent.h" 8 #include "platform/TraceEvent.h"
9 #include "platform/graphics/ImageDecodingStore.h" 9 #include "platform/graphics/ImageDecodingStore.h"
10 #include "public/platform/Platform.h" 10 #include "public/platform/Platform.h"
11 #include "wtf/Partitions.h" 11 #include "wtf/allocator/Partitions.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 void MemoryPurgeController::onMemoryPressure(WebMemoryPressureLevel level) 15 void MemoryPurgeController::onMemoryPressure(WebMemoryPressureLevel level)
16 { 16 {
17 if (level == WebMemoryPressureLevelCritical) { 17 if (level == WebMemoryPressureLevelCritical) {
18 // Clear the image cache. 18 // Clear the image cache.
19 ImageDecodingStore::instance().clear(); 19 ImageDecodingStore::instance().clear();
20 } 20 }
21 } 21 }
(...skipping 15 matching lines...) Expand all
37 client->purgeMemory(m_deviceKind); 37 client->purgeMemory(m_deviceKind);
38 WTF::Partitions::decommitFreeableMemory(); 38 WTF::Partitions::decommitFreeableMemory();
39 } 39 }
40 40
41 DEFINE_TRACE(MemoryPurgeController) 41 DEFINE_TRACE(MemoryPurgeController)
42 { 42 {
43 visitor->trace(m_clients); 43 visitor->trace(m_clients);
44 } 44 }
45 45
46 } // namespace blink 46 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698