From 281ef294fdf1bf246987984a6a7a3a5aca4d6517 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 1 Jan 2023 11:23:10 -0700 Subject: scripts/main.sh: Set GOMEMLIMIT based on system RAM --- scripts/main.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts') diff --git a/scripts/main.sh b/scripts/main.sh index 160aa42..d89f387 100755 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -17,6 +17,8 @@ CGO_ENABLED=0 go build -trimpath ./cmd/btrfs-rec mkdir -p "$b.gen" { set +x; } &>/dev/null +export GOMEMLIMIT="$(awk '/^MemTotal:/{ print $2 "KiB" }'