func SetOOMScore(pid, score int) error {
	path := fmt.Sprintf("/proc/%d/oom_score_adj", pid)
	f, err := os.OpenFile(path, os.O_WRONLY, 0)
	if err != nil {
		return err
	}
	defer f.Close()
	if _, err = f.WriteString(strconv.Itoa(score)); err != nil {
		if os.IsPermission(err) && (system.RunningInUserNS() || RunningUnprivileged()) {
			return nil
		}
		return err
	}
	return nil
}
SetOOMScore sets the oom score for the provided pid
package sys
import (
	"fmt"
	"os"
	"strconv"
	"github.com/opencontainers/runc/libcontainer/system"
)
const OOMScoreMaxKillable = -999