We're lacking an implementation of isUnderMemoryPressure() in bmalloc on Linux, which would help a lot with the scavenging process in memory-constrained systems. When found to be under memory pressure, the Scavenger thread makes an extra effort to free as much mapped memory as possible.
Calling back to bug #176089, one issue there was large memory consumption. While the fix in that bug helped a lot in that regard, always returning true in isUnderMemoryPressure() for testing purposes helps even further, keeping memory consumption of the WebProcess constantly well under 200MB, while otherwise it rises up to 300MB before it's finally scavenged down to a bit above 200MB.
There are other use cases that would benefit from correctly determining in bmalloc when the process is in a memory pressure situation. MSE requires multible MBs of data being constantly downloaded and fed into the media pipeline. This is reflected in memory consumption, where lack of scavenges causes that consumption to grow as the playback proceeds.
No clear idea how to implement this from my side. I suppose it could mimic memory pressure handler in WTF, but it might also depend on other things, e.g.whether GLib should be used in bmalloc.
*** This bug has been marked as a duplicate of bug 195938 ***