Check two separate budgets. Free RAM = total RAM - used RAM; free storage = total storage - used storage. The job must fit within each matching budget at the same time. Do not add spare RAM and spare storage into one pool. This paper model excludes virtual memory and other ways real systems may manage resources.
Worked example
A sample device has 20 MB RAM with 14 MB used: 6 MB free. Its storage has 50 MB total with 39 MB used: 11 MB free. A job needing 7 MB extra RAM and 8 MB extra storage does not fit: RAM is short by 1 MB. Spare storage cannot fill that RAM gap in this model.
Two Independent Budgets
Plan B: RAM 48 MB total, 31 MB used; storage 96 MB total, 72 MB used. Plan A: RAM 64 MB total, 40 MB used; storage 160 MB total, 137 MB used. The new job needs 17 MB EXTRA RAM and 24 MB EXTRA storage at the same time, beyond the amounts already used. All sizes use the same MB unit and include all needs. Existing use stays fixed. An exact fit counts; no virtual memory, compression or extra overhead is modeled. These are invented paper plans, not advice to change a real computer.