摘要 |
A virtual memory system and method enable a computer system to use a virtual memory address space larger than the size of physical primary memory while swapping few, if any, pages out to secondary memory. Primary memory is divided into a work space, used for storing uncompressed pages in current use, and a "Compression Heap". A MappedOut storage space, which includes the Compression Heap and a portion of secondary memory, is used to store all pages swapped out of the work space. A virtual memory manager dynamically determines the number of pages of primary memory which need to be included in the work space, and moves pages of primary memory into the work space from the Compression Heap as needed. Pages are selected to be swapped out of the work space to the MappedOut storage space on the basis of memory usage data. A data compressor compresses at least some virtual memory pages prior to their storage in the MappedOut storage space, and a data decompressor decompresses the compressed virtual memory pages when a fault occurs on the those pages. The virtual memory manager includes logic for preferentially compressing and storing swapped out virtual memory pages in the Compression Heap so long as the MappedOut storage page includes a sufficient number of pages of primary memory to store those virtual memory pages, and for storing ones of the swapped out virtual memory pages in secondary memory when insufficient space is available in the Compression Heap. |