kicad2ems.emsdev.memory

System memory: installed, and available to this process now.
kicad2ems.emsdev.memory.available()[source]
Bytes of memory available to this process: MemAvailable, capped by a
cgroup limit (Linux); what Windows reports available; else psutil's, else 8
GB; and capped by its budget() less what it holds.
kicad2ems.emsdev.memory.budget()[source]
EMSDEV_MEM_BUDGET: the bytes this process may hold in all (a number, or
with K, M or G: '6G'), a caller's share of a machine it runs several
processes on (core.segment's pieces); None where it is not set.
kicad2ems.emsdev.memory.cgroup_free(root='/sys/fs/cgroup', proc='/proc/self/cgroup')[source]
Bytes this process's cgroup can still take: the least (limit - usage)
over its own cgroup and every parent (a slice above can cap it too), cgroup
v2 or v1's memory controller; None where no cgroup limits it. The process's
own cgroup is the one /proc/self/cgroup names, not the root: a systemd
scope's MemoryMax sits there (inside a container, whose root is its own
cgroup, the two are the same).
kicad2ems.emsdev.memory.held()[source]
Bytes this process holds now (its resident set; None where that cannot
be read).
kicad2ems.emsdev.memory.total()[source]
Installed RAM in bytes (None where neither sysconf nor Windows can
tell).
kicad2ems.emsdev.memory.windows_status()[source]
Windows: (installed, available) bytes from GlobalMemoryStatusEx; None
elsewhere or where it fails.