Memory virtualization uses a portion of a disk drive as an extension of main memory. It divides both main memory and virtual memory into pages of equal size. Only needed pages reside in memory at a time, while unnecessary pages are stored on disk. When memory runs low, pages are written to the disk swap file as virtual memory. This allows larger programs to run in less physical RAM by swapping pages between disk and memory as needed.