Files
lincodex/runner/testdata/hostile/go/memory_leak.go
T

14 lines
259 B
Go

// Unbounded allocation of touched memory: the cgroup memory limit must stop it.
package main
func main() {
var chunks [][]byte
for {
chunk := make([]byte, 1<<20)
for index := range chunk {
chunk[index] = 1
}
chunks = append(chunks, chunk)
}
}