fix: 🐛 Fix edgecase where cgroup memory limit would not be set

This commit is contained in:
2024-08-25 17:03:10 +02:00
parent 26f32ca33a
commit 59b40388e9

View File

@@ -13,6 +13,10 @@ else
MEMLIMIT=$(grep MemTotal /proc/meminfo | awk '{print $2 * 1024}') MEMLIMIT=$(grep MemTotal /proc/meminfo | awk '{print $2 * 1024}')
fi fi
if ! [[ "$MEMLIMIT" =~ ^[0-9]+$ ]]; then
MEMLIMIT=$MEMSIZE
fi
MEMLIMIT=$((MEMLIMIT<MEMSIZE ? MEMLIMIT : MEMSIZE)) MEMLIMIT=$((MEMLIMIT<MEMSIZE ? MEMLIMIT : MEMSIZE))
MEMOFFSET_THRESH=4294967296 MEMOFFSET_THRESH=4294967296