Daily iOS
CS fundamentals and algorithms

Purpose of virtual memory

Someone asks you, "If a device has plenty of physical memory, why do we even need virtual memory?" How would you answer?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Virtual memory exists to give each process an isolated, protected address space, enable lazy loading and shared library mapping, and provide contiguous addresses, none of which is about capacity, so you need it however large physical memory gets.

Share a question