3 ms·
Oh, another big problem is that you need to actually write the data you're swapping out to disk. You can't just drop it on the floor whenever memory pressure is
by ori_b 17y ago
Oh, another big problem is that you need to actually write the data you're swapping out to disk. You can't just drop it on the floor whenever memory pressure is high; You have to wait for the disk so spin up, seek, write, and so on.
What you really want is to be able to tell the OS "I don't care if this data goes away. If you need space, don't bother taking time to save it, I can regenerate it quickly."