RESOLVED FIXED 164862
[Win32] Start releasing memory earlier when memory is running low.
https://bugs.webkit.org/show_bug.cgi?id=164862
Summary [Win32] Start releasing memory earlier when memory is running low.
Per Arne Vollan
Reported 2016-11-17 02:32:48 PST
On Windows, 32-bit processes have 2GB of memory available, where some is used by the system. Debugging has shown that allocations might fail and cause crashes when memory usage is > ~1GB. We should start releasing memory before we reach 1GB.
Attachments
Patch (1.68 KB, patch)
2016-11-17 02:36 PST, Per Arne Vollan
no flags
Per Arne Vollan
Comment 1 2016-11-17 02:36:29 PST
Per Arne Vollan
Comment 2 2016-11-17 04:24:27 PST
Brent Fulgham
Comment 3 2016-11-17 09:59:09 PST
Comment on attachment 295043 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295043&action=review r=me > Source/WebCore/platform/win/MemoryPressureHandlerWin.cpp:77 > + const int maxMemoryUsageBytes = 0.9 * 1024 * 1024 * 1024; So we trigger clean-up about 10% earlier than before? Seems reasonable. Would it make sense to convert this from a floating point calculation to just hard-coding the actual integer value that results from this math?
Per Arne Vollan
Comment 4 2016-11-18 01:43:52 PST
(In reply to comment #3) > Comment on attachment 295043 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=295043&action=review > > r=me > > > Source/WebCore/platform/win/MemoryPressureHandlerWin.cpp:77 > > + const int maxMemoryUsageBytes = 0.9 * 1024 * 1024 * 1024; > > So we trigger clean-up about 10% earlier than before? Seems reasonable. > > Would it make sense to convert this from a floating point calculation to > just hard-coding the actual integer value that results from this math? I checked the generated code, and the compiler will optimize this. Just let me know if you still want me to change it :) Thanks for reviewing!
WebKit Commit Bot
Comment 5 2016-11-18 02:03:24 PST
Comment on attachment 295043 [details] Patch Clearing flags on attachment: 295043 Committed r208883: <http://trac.webkit.org/changeset/208883>
WebKit Commit Bot
Comment 6 2016-11-18 02:03:28 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.