GoBlog/garbagecollector.go

11 lines
133 B
Go

package main
import (
"runtime/debug"
)
func initGC() {
// Set memory limit to 100 MB
debug.SetMemoryLimit(100 * 1000 * 1000)
}