The current thresholds for the WebProcess memory monitor are hard-coded and doesn't make sense on an embedded system where having 1GB or 512MB of RAM is usual.
Created attachment 336116 [details] Patch
Created attachment 336125 [details] Patch Patch v2, try to fix windows build
Comment on attachment 336125 [details] Patch Informal r=me. Reading this patch makes me think that we might want to think whether it might make sense to provide some API which allows programs to set their own thresholds — each embedded application is a different beast. Dunno. At any rate, your proposed improvements look much better to me than the current hardcoded values, so I hope others agree and this can be landed.
ping reviewers? all EWS are green.
Comment on attachment 336125 [details] Patch r=me too.
Comment on attachment 336125 [details] Patch Clearing flags on attachment: 336125 Committed r229894: <https://trac.webkit.org/changeset/229894>
All reviewed patches have been landed. Closing bug.
Comment on attachment 336125 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=336125&action=review > Source/WTF/wtf/MemoryPressureHandler.cpp:152 > + WTFLogAlways("Unable to shrink memory footprint of process (%lu MB) below the kill thresold (%lu MB). Killed\n", footprint.value() / MB, thresholdForMemoryKill() / MB); %lu is not the correct format for a size_t; %zu is correct. This might compile on platforms where size_t happens to be the same as unsigned long, but these %lu should be changed to %zu.
(In reply to Darin Adler from comment #8) > Comment on attachment 336125 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=336125&action=review > > > Source/WTF/wtf/MemoryPressureHandler.cpp:152 > > + WTFLogAlways("Unable to shrink memory footprint of process (%lu MB) below the kill thresold (%lu MB). Killed\n", footprint.value() / MB, thresholdForMemoryKill() / MB); > > %lu is not the correct format for a size_t; %zu is correct. This might > compile on platforms where size_t happens to be the same as unsigned long, > but these %lu should be changed to %zu. I picked %lu because that was used already on this file for other two messages involving size_t, but you're right: %zu should be used instead. I have opened bug 183997 to fix this one and the other two.