Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c021912ad55c263dd1270fc64bf1a8e2df3ce383
https://github.com/WebKit/WebKit/commit/c021912ad55c263dd1270fc64bf1a8e2df3ce383
Author: Yusuke Suzuki <[email protected]>
Date: 2026-01-30 (Fri, 30 Jan 2026)
Changed paths:
M Source/JavaScriptCore/heap/Heap.cpp
M Source/JavaScriptCore/heap/Heap.h
M Source/JavaScriptCore/runtime/Options.cpp
M Source/WTF/WTF.xcodeproj/project.pbxproj
A Source/WTF/wtf/AvailableMemory.cpp
A Source/WTF/wtf/AvailableMemory.h
M Source/WTF/wtf/CMakeLists.txt
M Source/WTF/wtf/PlatformMac.cmake
M Source/WTF/wtf/PlatformUse.h
M Source/WTF/wtf/RAMSize.cpp
M Source/WTF/wtf/generic/MemoryFootprintGeneric.cpp
A Source/WTF/wtf/spi/darwin/MemoryStatusSPI.h
M Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
M Source/bmalloc/CMakeLists.txt
M Source/bmalloc/PlatformMac.cmake
M Source/bmalloc/bmalloc.xcodeproj/project.pbxproj
R Source/bmalloc/bmalloc/AvailableMemory.cpp
R Source/bmalloc/bmalloc/AvailableMemory.h
M Source/bmalloc/bmalloc/Sizes.h
M Source/bmalloc/bmalloc/bmalloc.h
R Source/bmalloc/bmalloc/darwin/MemoryStatusSPI.h
Log Message:
-----------
[WTF] Move AvailableMemory from bmalloc to WTF
https://bugs.webkit.org/show_bug.cgi?id=306653
rdar://169305168
Reviewed by Marcus Plutowski and Mark Lam.
After removing old bmalloc implementation, bmalloc is no longer using
this availableMemory.h's functions. They are now used only by WTF /
JavaScriptCore / WebCore. Since it is not directly related to malloc's
implementation, let's just move them to WTF. Also just moving
MemoryStatusSPI.h from bmalloc to WTF.
* Source/JavaScriptCore/heap/Heap.cpp:
(JSC::Heap::overCriticalMemoryThreshold):
* Source/JavaScriptCore/heap/Heap.h:
* Source/JavaScriptCore/runtime/Options.cpp:
(JSC::overrideDefaults):
* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/AvailableMemory.cpp: Renamed from
Source/bmalloc/bmalloc/AvailableMemory.cpp.
(WTF::memorySizeAccordingToKernel):
(WTF::jetsamLimit):
(WTF::computeAvailableMemory):
(WTF::memoryStatus):
* Source/WTF/wtf/AvailableMemory.h: Renamed from
Source/bmalloc/bmalloc/AvailableMemory.h.
(WTF::isUnderMemoryPressure):
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/PlatformMac.cmake:
* Source/WTF/wtf/PlatformUse.h:
* Source/WTF/wtf/RAMSize.cpp:
(WTF::ramSize):
(WTF::computeRAMSize): Deleted.
* Source/WTF/wtf/generic/MemoryFootprintGeneric.cpp:
(WTF::memoryFootprint):
* Source/WTF/wtf/spi/darwin/MemoryStatusSPI.h: Renamed from
Source/bmalloc/bmalloc/darwin/MemoryStatusSPI.h.
* Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:
* Source/bmalloc/CMakeLists.txt:
* Source/bmalloc/PlatformMac.cmake:
* Source/bmalloc/bmalloc.xcodeproj/project.pbxproj:
* Source/bmalloc/bmalloc/Sizes.h:
* Source/bmalloc/bmalloc/bmalloc.h:
(bmalloc::api::availableMemory): Deleted.
(bmalloc::api::memoryFootprint): Deleted.
(bmalloc::api::percentAvailableMemoryInUse): Deleted.
Canonical link: https://commits.webkit.org/306535@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications