Warn about memory usage.

This commit is contained in:
Matthew Chen 2021-10-27 15:37:53 -03:00
parent 5a7f51e9ad
commit dec8fd24bd

View File

@ -47,6 +47,12 @@ public class LocalDevice: NSObject {
guard let memoryUsageUInt64 = self.memoryUsageUInt64 else {
return "Unknown"
}
return "\(memoryUsageUInt64)"
let nseMemoryUsageWarn: UInt64 = 24 * 1000 * 1000
if CurrentAppContext().isNSE,
memoryUsageUInt64 > nseMemoryUsageWarn {
return "\(memoryUsageUInt64) ⚠️⚠️⚠️"
} else {
return "\(memoryUsageUInt64)"
}
}
}