This CL lets us schedule a purge of unlocked discardable memory from the
foreground tab to run every minute.
This is hidden behind a feature which is disabled by default, so there
should be no changes to functionality.
Bug: 1109209
Change-Id: Icb2474b1026e2283ccc772cd3a602d46ef628dc8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2370655
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Benoit L <lizeb@chromium.org>
Commit-Queue: Thiabaud Engelbrecht <thiabaud@google.com>
Cr-Commit-Position: refs/heads/master@{#803848}
Add detection code for a field trial comparing different
implementations of discardable memory, targeting a very
specific subset of devices and platforms which possess
required capabilities. Further details in bug if required.
Bug: 1014513
Change-Id: Id81a19b06e0c94fa6090ef1d5f6d2cd7fdd80e1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1922749
Commit-Queue: Gordon Guan <gordonguan@google.com>
Reviewed-by: Egor Pasko <pasko@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719665}
Generalize usage of discardable memory in the renderer process to use
higher-level discardable memory primitives (DiscardableMemoryAllocator
and DiscardableMemory).
Implement a factory method to create a discardable memory allocator
implementation in renderer context depending on platform support.
Note that usage of MADV_FREE DiscardableMemory is gated by a feature
flag. Discardable memory should behave exactly as before this
change if the feature flag is not enabled.
Binary-Size: Unused ForTest method not being removed by linker
Bug: 1014513
Change-Id: I94afd2347a6ecbe254cd2d1a3ad667a6624293ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1850758
Commit-Queue: Gordon Guan <gordonguan@google.com>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Benoit L <lizeb@chromium.org>
Reviewed-by: Egor Pasko <pasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713010}