Skip to content

Glossary

Jetsam

XNU's memory-pressure killer. Terminates the lowest-priority process in a memory band when free RAM falls under threshold.

Jetsam is the kernel subsystem that picks processes to kill when memory pressure gets high enough that the VM compressor can't keep up. Named after the seafaring term for cargo thrown overboard.

apple-oss-distributions/xnubsd/kern/kern_memorystatus.cmemorystatus / jetsam — the kill policy and memory band tracking.View on GitHub(line )

Each process is assigned a jetsam priority by launchd based on its band — foreground app, background daemon, helper, etc. When free memory drops below the threshold for a given band, the kernel kills the lowest-priority process in that band first.

This is the same machinery iOS uses to keep the foreground app alive when memory is tight. On a Mac with abundant RAM you'll never trip it; on lower-spec machines running heavy creative tools, you will — and you'll see the killed apps re-launch silently when you come back to them.

See also: VM compressor, launchd.