Bug 297533
| Summary: | [Win] Faster memory pressure handler | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ian Grunert <ian.grunert> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | PC | ||
| OS: | Windows 11 | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=146685 | ||
Ian Grunert
When running the layout tests the system runs so low on memory that it can't run ruby:
ScriptError raised: Failed to run "['ruby', '--version']" exit_code: 3221226505 (from worker/5)
The current memory pressure handler runs once per minute. Ideally we'd use a wait function or similar so we can clear memory as soon as the LowMemoryResourceNotification triggers.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ian Grunert
I think the current memory pressure handler might also run once and then uninstall the timer.
Ian Grunert
Also it looks like platformInitialize() is never called, so m_lowMemoryHandle is never initialized.
Radar WebKit Bug Importer
<rdar://problem/159104225>
Ian Grunert
https://searchfox.org/firefox-main/source/xpcom/base/AvailableMemoryWatcherWin.cpp#222-242
I think we should be able to use RegisterWaitForSingleObject, and when we get the callback enqueue a one-shot timer to call the scavenger.
This is lower priority now, as ENABLE_PERIODIC_MEMORY_MONITOR has been enabled for Windows.
EWS
Committed 313270@main (dc311bb8313d): <https://commits.webkit.org/313270@main>
Reviewed commits have been landed. Closing PR #63320 and removing active labels.