Skip to content

[libpas] Clean up Windows implementation - #63762

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
Constellation:windows-cleanup
Apr 28, 2026
Merged

webkit-commit-queue merged 1 commit into
WebKit:mainfrom
Constellation:windows-cleanup

Conversation

@Constellation

@Constellation Constellation commented Apr 28, 2026 •

Copy link
Copy Markdown
Member

0e74ad9

[libpas] Clean up Windows implementation
https://bugs.webkit.org/show_bug.cgi?id=313512
rdar://175725768

Reviewed by Marcus Plutowski.

1. Scan libpas pthread stub on Windows and fix obvious issues.
2. We reintroduce is_symmetric flag to pas page allocation. When it is set,
   commit and decommit are paired explicitly (asymmetric protocol does not
   require explicit commit) as Windows has commit charge limit which
   does not exits on POSIX environment.

* Source/WTF/wtf/win/OSAllocatorWin.cpp:
(WTF::OSAllocator::decommit):
* Source/bmalloc/libpas/src/libpas/pas_config.h:
* Source/bmalloc/libpas/src/libpas/pas_expendable_memory.c:
(scavenge_impl):
* Source/bmalloc/libpas/src/libpas/pas_monotonic_time.c:
(pas_get_current_monotonic_time_nanoseconds):
* Source/bmalloc/libpas/src/libpas/pas_page_malloc.c:
(virtual_query_checked):
(virtual_alloc_with_retry):
(pas_page_malloc_try_map_pages):
(commit_impl):
(pas_page_malloc_commit):
(pas_page_malloc_commit_without_mprotect):
(decommit_impl):
(pas_page_malloc_decommit):
(pas_page_malloc_decommit_without_mprotect):
(pas_page_malloc_deallocate):
* Source/bmalloc/libpas/src/libpas/pas_page_malloc.h:
* Source/bmalloc/libpas/src/libpas/pas_scavenger.c:
(get_time_in_milliseconds):
* Source/bmalloc/libpas/src/libpas/pas_thread.c:
(pthread_create):
(pthread_detach):
(pthread_once):
(pthread_key_create):
(pthread_cond_timedwait):
* Source/bmalloc/libpas/src/libpas/pas_thread.h:
* Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c:
(deallocate):
(pas_thread_local_cache_ensure_committed):
(decommit_allocator_range):

Canonical link: https://commits.webkit.org/312218@main

cb02a8b

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win ❌ 🛠 ios-apple
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ✅ 🧪 win-tests ⏳ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe loading 🛠 vision-apple
✅ 🧪 ios-wk2-wpt ✅ 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-debug-arm64 ✅ 🛠 ios-safer-cpp ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🛠 playstation
✅ 🛠 🧪 unsafe-merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 jsc-armv7
✅ 🛠 tv ✅ 🛠 mac-safer-cpp ✅ 🧪 jsc-armv7-tests
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@Constellation
Constellation requested a review from a team as a code owner April 28, 2026 02:57
@Constellation Constellation self-assigned this Apr 28, 2026
@Constellation Constellation added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Apr 28, 2026

@Achierius Achierius left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me

@Constellation Constellation added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Apr 28, 2026
https://bugs.webkit.org/show_bug.cgi?id=313512
rdar://175725768

Reviewed by Marcus Plutowski.

1. Scan libpas pthread stub on Windows and fix obvious issues.
2. We reintroduce is_symmetric flag to pas page allocation. When it is set,
   commit and decommit are paired explicitly (asymmetric protocol does not
   require explicit commit) as Windows has commit charge limit which
   does not exits on POSIX environment.

* Source/WTF/wtf/win/OSAllocatorWin.cpp:
(WTF::OSAllocator::decommit):
* Source/bmalloc/libpas/src/libpas/pas_config.h:
* Source/bmalloc/libpas/src/libpas/pas_expendable_memory.c:
(scavenge_impl):
* Source/bmalloc/libpas/src/libpas/pas_monotonic_time.c:
(pas_get_current_monotonic_time_nanoseconds):
* Source/bmalloc/libpas/src/libpas/pas_page_malloc.c:
(virtual_query_checked):
(virtual_alloc_with_retry):
(pas_page_malloc_try_map_pages):
(commit_impl):
(pas_page_malloc_commit):
(pas_page_malloc_commit_without_mprotect):
(decommit_impl):
(pas_page_malloc_decommit):
(pas_page_malloc_decommit_without_mprotect):
(pas_page_malloc_deallocate):
* Source/bmalloc/libpas/src/libpas/pas_page_malloc.h:
* Source/bmalloc/libpas/src/libpas/pas_scavenger.c:
(get_time_in_milliseconds):
* Source/bmalloc/libpas/src/libpas/pas_thread.c:
(pthread_create):
(pthread_detach):
(pthread_once):
(pthread_key_create):
(pthread_cond_timedwait):
* Source/bmalloc/libpas/src/libpas/pas_thread.h:
* Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c:
(deallocate):
(pas_thread_local_cache_ensure_committed):
(decommit_allocator_range):

Canonical link: https://commits.webkit.org/312218@main
@webkit-commit-queue

Copy link
Copy Markdown
Collaborator

Committed 312218@main (0e74ad9): https://commits.webkit.org/312218@main

Reviewed commits have been landed. Closing PR #63762 and removing active labels.

@webkit-commit-queue
webkit-commit-queue merged commit 0e74ad9 into WebKit:main Apr 28, 2026
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Apr 28, 2026
@Constellation
Constellation deleted the windows-cleanup branch April 28, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants