mirror of
https://git.freebsd.org/ports.git
synced 2025-05-15 00:31:51 -04:00
21 lines
824 B
C
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;
|