Bug 297533

Summary: [Win] Faster memory pressure handler
Product: WebKit Reporter: Ian Grunert <ian.grunert>
Component: New BugsAssignee: 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
Reported 2025-08-18 07:40:34 PDT
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
Ian Grunert
Comment 1 2025-08-18 07:57:41 PDT
I think the current memory pressure handler might also run once and then uninstall the timer.
Ian Grunert
Comment 2 2025-08-18 10:46:17 PDT
Also it looks like platformInitialize() is never called, so m_lowMemoryHandle is never initialized.
Radar WebKit Bug Importer
Comment 3 2025-08-25 07:41:13 PDT
Ian Grunert
Comment 4 2025-09-03 11:46:19 PDT
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
Comment 5 2026-05-14 15:45:56 PDT
Committed 313270@main (dc311bb8313d): <https://commits.webkit.org/313270@main> Reviewed commits have been landed. Closing PR #63320 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.