memory-cap: give claude a heap ceiling of at most 3 GiB instead of 75% of the container cap
This commit is contained in:
parent
608eb9dcd9
commit
82710f4fa8
1 changed files with 17 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue