ports/www/webkit2-gtk4/files/patch-Source_bmalloc_bmalloc_AvailableMemory.h
2023-02-03 10:02:27 -08:00

21 lines
824 B
C

Index: Source/bmalloc/bmalloc/AvailableMemory.h
--- Source/bmalloc/bmalloc/AvailableMemory.h.orig
+++ Source/bmalloc/bmalloc/AvailableMemory.h
@@ -32,7 +32,7 @@ namespace bmalloc {
BEXPORT size_t availableMemory();
-#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) || BOS(FREEBSD)
+#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) || BOS(FREEBSD) || BOS(OPENBSD)
struct MemoryStatus {
MemoryStatus(size_t memoryFootprint, double percentAvailableMemoryInUse)
: memoryFootprint(memoryFootprint)
@@ -61,7 +61,7 @@ inline double percentAvailableMemoryInUse()
inline bool isUnderMemoryPressure()
{
-#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) || BOS(FREEBSD)
+#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) || BOS(FREEBSD) || BOS(OPENBSD)
return percentAvailableMemoryInUse() > memoryPressureThreshold;
#else
return false;