10. Limits (macOS)
10. Limits (macOS)¶
Result: works with nothing to set up. A container's --memory is its
VM's size, and the kernel inside the VM kills the job that exceeds it.
Setup (2026-11-22)¶
As #9. spike/macos_memory_limit.py: container run --rm --memory 256M
python:3.13-alpine writing 128 MiB (control) or 512 MiB, three runs each.
Raw results¶
| Job | Exit | Output | Time (s) |
|---|---|---|---|
| 128 MiB | 0 | "allocated 128 MiB" | 0.54, 0.54, 0.54 |
| 512 MiB | 137 | none | 0.57, 0.58, 0.59 |
What we learned¶
- Limits on macOS need nothing like Linux's job cgroups: one VM per job is one limit per job.
- The limit doesn't include the host-side cost from #9, so a runner has to budget ~300 MB on top of each job's limit.
What it changes¶
Nothing new in the design; the runner sets --memory from the job's limit.