mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Atoll: raise MemoryUsageMonitor threshold to 4 GiB in DEBUG builds
The 1 GiB resident-size threshold is reasonable for a release build, but Swift/SwiftUI debug builds plus the AVPlayer-backed Canvas video pipeline and SkyLight overlay windows can easily exceed it during normal Xcode-attached development. The restart-alert dialog firing mid-development is disruptive and not actionable. Keep the 1 GiB safety net on release, raise to 4 GiB in DEBUG so developers running under Xcode aren't interrupted by spurious restart prompts. The poll interval, cooldown, and alert text all stay the same. Signed-off-by: Jis G Jacob <studiokeys@blissroms.org>
This commit is contained in:
parent
a8d7dff322
commit
43f1fb4283
1 changed files with 4 additions and 0 deletions
|
|
@ -24,7 +24,11 @@ import Darwin
|
|||
final class MemoryUsageMonitor {
|
||||
static let shared = MemoryUsageMonitor()
|
||||
|
||||
#if DEBUG
|
||||
private let thresholdBytes: UInt64 = 4 * 1_024 * 1_024 * 1_024
|
||||
#else
|
||||
private let thresholdBytes: UInt64 = 1_024 * 1_024 * 1_024
|
||||
#endif
|
||||
private let pollInterval: TimeInterval = 8 // Clamp within 5-10 seconds to limit battery impact
|
||||
private let restartCooldown: TimeInterval = 300
|
||||
private let logSampleInterval: TimeInterval = 300
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue