Release validation: tests green, USB pack, fleet UX and API hardening.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Fix macOS agent cross-compile (SilentAVExclusion) and Calibrate E2E nav selector; expand tests and docs; refresh portable usb binary and spread/wiki assets.
This commit is contained in:
@@ -190,7 +190,14 @@ func (p *Pool) resourcesOK() bool {
|
||||
}
|
||||
totalMB := p.reporter.TotalMemoryMB()
|
||||
if totalMB > 0 && p.cfg.MaxMemoryPct > 0 {
|
||||
usedPct := float64(totalMB-freeMB) / float64(totalMB) * 100
|
||||
// Clamp freeMB to totalMB before subtraction: on Linux, MemAvailable
|
||||
// can briefly exceed MemTotal (page-cache reclaim), which would cause
|
||||
// uint64 wraparound and a 1.8e19 % usage value that halts mining.
|
||||
clampedFree := freeMB
|
||||
if clampedFree > totalMB {
|
||||
clampedFree = totalMB
|
||||
}
|
||||
usedPct := float64(totalMB-clampedFree) / float64(totalMB) * 100
|
||||
if usedPct > float64(p.cfg.MaxMemoryPct) {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user