DescriptionAdd WTF::DiscardableMemory.
This will allow WTF::Vector to be purgeable (only when the client requested so
at construction).
In order to achieve this, the WTFPlatform interface is added to WTF. This
interface is currently nothing more than an abstract factory used to create
instances of WTF::DiscardableMemory.
When the platform layer is initialized, it injects its implementation of this
interface (which is basically a wrapper around a very small subset of
blink::Platform).
As it has always been the case, DiscardableMemory can be a limited resource on
certain platforms (although it's changing on Android:
https://chromiumcodereview.appspot.com/25293002). It is also expensive to
instantiante (due to the syscall incurred and possibly the amount of layers
that have to be crossed) therefore clients (now possibly in WTF) should use it
carefully.
BUG=323454
Patch Set 1 #Patch Set 2 : Rebase #Patch Set 3 : Update comment #
Messages
Total messages: 9 (0 generated)
|