head 1.1; access; symbols; locks; strict; comment @// @; 1.1 date 2026.09.22.12.27.02; author wiz; state Exp; branches; next ; commitid HjjmzcByixSfbCWG; desc @@ 1.1 log @webkit-gtk41: update to 2.54.0. - Switch web process compositor to use Skia instead of TextureMapper. - Improved damage handling that is now also used during the composition to limit the composited areas. - Implement GPU atlas creation and replay substitution for batched raster image uploads. - Media capability reporting is more accurate. - Video decoding limits are now respected in media capabilities queries. - Add new improved API for page favicons. - Add magnification property to WebKitWebView to handle visual scaling. - Add new API to allow setting a per-navigation custom User-Agent to WebKitWebsitePolicies. - Remove the option to use cairo for 2D rendering. Also tested by fox@@ @ text @$NetBSD$ Add NetBSD support for memoryStatus. --- Source/WTF/wtf/AvailableMemory.cpp.orig 2026-09-16 19:58:03.960294163 +0000 +++ Source/WTF/wtf/AvailableMemory.cpp @@@@ -50,6 +50,9 @@@@ #include #include #include +#elif OS(NETBSD) +#include +#include #endif #include #elif OS(WINDOWS) @@@@ -182,7 +185,7 @@@@ size_t availableMemory() return availableMemory; } -#if PLATFORM(IOS_FAMILY) || OS(LINUX) || OS(FREEBSD) +#if PLATFORM(IOS_FAMILY) || OS(LINUX) || OS(FREEBSD) || OS(NETBSD) MemoryStatus memoryStatus() { #if PLATFORM(IOS_FAMILY) @@@@ -204,6 +207,15 @@@@ MemoryStatus memoryStatus() size_t memoryFootprint = 0; if (!sysctl(mib.data(), mib.size(), &info, &infolen, nullptr, 0)) memoryFootprint = static_cast(info.ki_rssize) * pageSize(); +#elif OS(NETBSD) + struct kinfo_proc2 info; + size_t infolen = sizeof(info); + + std::array mib { CTL_KERN, KERN_PROC2, KERN_PROC_PID, getpid() }; + + size_t memoryFootprint = 0; + if (!sysctl(mib.data(), mib.size(), &info, &infolen, nullptr, 0)) + memoryFootprint = static_cast(info.p_vm_rssize) * pageSize(); #endif double percentInUse = static_cast(memoryFootprint) / static_cast(availableMemory()); @