add memory limit

This commit is contained in:
2026-04-10 18:45:40 +03:00
parent 86b8d83643
commit a977d4d9f5
13 changed files with 662 additions and 37 deletions

View File

@@ -8,6 +8,7 @@ type File struct {
BuildWindows string
BuildDarwin string
Timeout time.Duration
MemoryLimit int64 // bytes; 0 means no limit
Binary string // executable name produced by build (default: solution)
Sources string // glob pattern for source files, expanded as $SOURCES in build
@@ -18,12 +19,13 @@ type File struct {
}
type Group struct {
Name string
Weight float64
Timeout time.Duration
Env map[string]string
Scoring ScoringMode
Wrapper string // exec wrapper command (e.g., "valgrind --error-exitcode=1")
Name string
Weight float64
Timeout time.Duration
MemoryLimit int64
Env map[string]string
Scoring ScoringMode
Wrapper string // exec wrapper command (e.g., "valgrind --error-exitcode=1")
Tests []*Test
Pattern *Pattern
@@ -50,10 +52,11 @@ func (p *Pattern) IsDirMode() bool {
}
type Test struct {
Name string
Timeout time.Duration
Env map[string]string
Wrapper string
Name string
Timeout time.Duration
MemoryLimit int64
Env map[string]string
Wrapper string
Stdin *string
Args []string