def scope

ezx@1.11.0.0 · src/share/cap.bend:36

import ezx@1.11.0.0/src/share/cap.bend as Cap
import Base

36# the cgroup a capped run gets. `MemorySwapMax=0` matters: without it the
37# cgroup spills into swap and the cap stops meaning anything.
38def scope(+gigs: String) -> List<&2, String>:
39  ["systemd-run", "--user", "--scope", "-q", "-p", "MemoryMax=" ++ gigs ++ "G",
40    "-p", "MemorySwapMax=0", "nice"]

Uses (3)

Used by (1)