7Memory
Virtual Memory
Virtual memory is a way for the computer to fake having more memory than it actually has. A machine might have four gigabytes of RAM, but you can write programs that manipulate data several times that amount. When you overflow the available amount of real memory, portions of the data are saved out to disk and read back in when the program needs it.
The operating system handles the grungy details of keeping data that is currently being worked on physically in memory and moving data that has not been touched in a while out to the disk. It also pulls the data back into memory from disk if the program wants to work with it again.
The operating system divides memory into pages, 4KB chunks of memory that the operating system ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access