Files
judge/runner/limiter_other.go
Mikhail Kornilovich a8adbfbae1
Some checks failed
memory-limit / Build judge (push) Successful in 13s
memory-limit / Linux / clang (push) Failing after 10s
memory-limit / Linux / gcc (push) Failing after 10s
memory-limit / Windows / clang (push) Failing after 13s
memory-limit / Windows / msvc (push) Failing after 13s
try to fix root ownership
2026-04-10 23:49:59 +03:00

30 lines
624 B
Go

//go:build !linux && !windows
package runner
import (
"fmt"
"os/exec"
)
type noopLimiter struct {
memLimit int64
}
func newLimiter(memLimit int64) limiter {
return &noopLimiter{memLimit: memLimit}
}
func (l *noopLimiter) prepare(cmd *exec.Cmd) error {
if l.memLimit > 0 {
return fmt.Errorf("memory_limit is not supported on this platform (only linux/windows)")
}
return nil
}
func (l *noopLimiter) afterStart(cmd *exec.Cmd) error { return nil }
func (l *noopLimiter) collect() limitStats { return limitStats{} }
func (l *noopLimiter) cleanup() {}
func cleanupCgroupRoot() {}