Hi memory-dev,
I've been working on triaging
crbug.com/1329340, and I think it's a result of GC-able memory not getting reclaimed often enough during layout on a very large document, and eventually crashing with an out-of-memory condition.
Coming from a Java background, I got to thinking about some of the GC ergonomics there, such as collecting based on mutator CPU utilization, allocation rate, fixed heap thresholds, etc. But then I remembered an even simpler, "last ditch" safeguard: trying to do a final garbage collection when memory is exhausted.
Does Oilpan + PartitionAlloc support anything like this already? I'm thinking attempts to allocate memory could block on a callback that triggers a full GC run, to attempt to free memory before finally crashing. Obviously, performance would not be good, and trying to do a GC while memory is exhausted sounds... exciting, but it possibly could prevent a number of OOMs which are due to not collecting often enough.