Allow Oilpan heap objects account for their external allocations.

The GC heuristics take into account the amount of objects allocated since
the last GC, in terms of the amount of Oilpan heap bytes allocated.

It does not consider the amount of external memory owned by an
Oilpan object. Allow objects to register such external allocations and
have the GC heuristics consider it -- if the heap isn't otherwise
considered worth GCing but it contains references to a large amount of
external memory, scheduling a GC may lessen the overall memory pressure
for the process.

Along with this, also add support for letting the outside world notify
Oilpan that a GC is now really worth considering. Intended used by other
allocators if they are running into near-OOM conditions.

R=haraken
BUG=456498

Review URL: https://codereview.chromium.org/875503003

git-svn-id: svn://svn.chromium.org/blink/trunk@190702 bbb929c8-8fbe-4397-9dbb-9b2b20218538
5 files changed
tree: 84f3ba415cae7638814854d81be57b362bb3e7f1
  1. third_party/