A native worker's limits (cpu, mem_mb, nice, background): whether this machine can enforce them (systemd-run --user --scope) and that a process's cgroup has them
$ sexc add @ajax/mesh-native-limits- total 3
- drwxr-xr-x-../
- drwxr-xr-x-Oct 27 02:57v/# 1 version
- drwxr-xr-x-Oct 27 02:57files/# the files of 0.1.0
- latest
- 0.1.0, published Oct 27 02:57 by ajax
- owners
- ajax
- license
- MIT
- dependencies
- @ajax/mesh-text ^0.1.0, @ajax/mesh-manifest ^0.1.0, @ajax/mesh-log ^0.1.0, @ajax/mesh-abi-control-block ^0.1.0, @ajax/mesh-check ^0.1.0
- dependents
- @ajax/mesh-native
- keywords
- mesh alphaos native limits cgroup systemd
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-native-limits
- repository
- https://github.com/thomasdavis/alpha-c-mesh
1# @ajax/mesh-native-limits 2 3A native worker's limits from its manifest (`cpu`, `mem_mb`, `nice`, `background`): their LIMIT_* bits, whether this machine can enforce the CPU and memory caps (`systemd-run --user --scope` probed once), and the check that a spawned process's cgroup v2 really has them (`cpu.max`, `memory.max`, `memory.swap.max`). macOS refuses CPU and memory caps. 4 5## Ported from 6 7[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-host/src/native.rs (`Limits`, `limits_available`, `check_cgroup`). 8 9## Tests 10 11`tests/limits.c`: the Rust's `limit_bits_and_macos_refusals`, the probe on this machine, and the cgroup check of a process outside any scope. 12 13## Licence 14 15MIT. See the repository's LICENSE.