Memory Overcommit Planner

Work out a Linux kernel's commit limit from RAM, swap and vm.overcommit_ratio, then see whether a new allocation is admitted, refused with ENOMEM, or accepted into overcommit where the OOM killer decides.

Choose Plan admission to see whether this allocation fits under the commit limit.

Linux accounts for virtual memory, not just resident pages. In vm.overcommit_memory = 2 the kernel enforces CommitLimit = swap + RAM × vm.overcommit_ratio / 100 (visible in /proc/meminfo) and refuses a request that would push Committed_AS past it with ENOMEM. Mode 0 only rejects obviously excessive requests and can still end in the OOM killer; mode 1 never refuses. Estimates only; all arithmetic stays in your browser.