Watch
0
0
Fork
You've already forked hyperhive
0

memory-cap: give claude a heap ceiling of at most 3 GiB instead of 75% of the container cap

This commit is contained in:
damocles 2026-11-27 17:08:19 +01:00 • committed by mara
commit 82710f4fa8

View file

@ -85,10 +85,13 @@ check() {
}
printf '8589934592\n' >"$cap"
check "an 8G cap" 6442450944 5726623061
check "an 8G cap keeps the heap at the 3 GiB ceiling, not 75%" 3221225472 5726623061
printf '2147483648\n' >"$cap"
check "a 2G cap is below the ceiling and keeps 75%" 1610612736 1431655765
printf '4294967296' >"$cap"
check "a line without a newline is kept" 3221225472 2863311530
check "a line without a newline is kept (75% is exactly the ceiling)" 3221225472 2863311530
printf '4294967296\nLD_PRELOAD=/x\n' >"$cap"
check "only the first line is read" 3221225472 2863311530