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

Side by Side Diff: base/memory/memory_coordinator.md

Issue 2678323002: Add documentation for MemoryCoordinator-related primitives
Patch Set: temp Created 3 years, 10 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
(Empty)
1 # Overview
2
3 To be a good memory citizen, each memory-intensive component needs to
4 have the following two notions:
Ryan Sleevi 2017/02/25 02:57:10 Suggestion: "memory-intensive" leaves it subjectiv
5
6 (a) How to deal with past allocations when the system is under high memroy press ure.
7 Specifically, the component is expected to purge as much memory as possible.
8 This is a 'reactive' way to reduce memory footprint.
9
10 (b) How to deal with future allocations when the system is under high memroy pre ssure.
11 Specifically, the component is expected to throttle future memory allocations by ,
12 for example, lowering the cache size. This is a 'proactive' way to reduce memory footprint.
13
14 # Current status
Ryan Sleevi 2017/02/25 02:57:10 # Current Status ## Reactive Reduction To properl
15
16 Currently we have three ways to control memory components:
17 MemoryCoordinator, MemoryPressureListener and isLowEndDevice.
18
19 * The MemoryPressureListener provides a way for memory components to listen
20 memory-pressure notifications and purge memory when the system is under
21 high memory pressure. The MemoryPressureListener is an interface that provides A PIs
22 to deal with (a).
23
24 * The isLowEndDevice provides a way for memory components to enter a low-memory
25 mode on low-memory devices. In the low-memory mode, the memory components
26 are exepcted to trade off performance for memory. The isLowEndDevice is a compil e-time
27 configuration to deal with (b).
28
29 * MemoryCoordinator is going to provide APIs for (a) and (b). In the future,
30 the MemoryPressureListener and the isLowEndDevice will be unified into the Memor yCoordinator.
31 The MemoryCoordinator is still behind a runtime flag. Until it is fully shipped,
32 each memory component needs to support all of the MemoryPressureListener,
33 the isLowEndDevice and the MemoryCoordinator.
OLDNEW
« no previous file with comments | « no previous file | base/memory/memory_coordinator_client.h » ('j') | base/memory/memory_coordinator_client.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698