def gb
import ezx@1.11.0.0/src/share/cap.bend as Capimport Base
import ezx@1.11.0.0/src/share/env.bend as Env
14# how many gigabytes one `bend` may have. 8 is what fits beside the rest of
15# this machine; a project whose closure costs more says so in EZ_CAP.
16#
17# The cap is also the divisor the gate picks its width from, since a run has to
18# assume every job it starts at once could want the whole of it. So a cap set
19# higher than a tree needs does not only reserve memory, it narrows the gate:
20# the dearest aggregate here peaks at 3.3G, and at the 8G cap that is a width
21# of 4 where 11 would fit. Lower EZ_CAP, or set EZ_JOBS outright, for a tree
22# you have measured.
23def gb() -> IO(String):
24 Env.var("EZ_CAP", "8")