Patent ID: 9058197
Filing Date: 2015-06-16
Classification: G06F

Abstract:
1. A method for sharing memories of virtual machines, adapted to a computer system configured to execute at least one virtual machine, wherein the computer system comprises a plurality of physical memory pages, and the method for sharing memories of virtual machines comprising: obtaining a memory map corresponding to the at least one virtual machine, wherein the memory map stores usage states of a plurality of guest physical memory pages on the at least one virtual machine, wherein the guest physical memory pages are virtual; marking unused memory pages among the guest physical memory pages on the at least one virtual machine as a plurality of first free pages according to the memory map corresponding to the at least one virtual machine; marking the guest physical memory pages marked as the first free pages as a read-only state; and sharing the first free pages that are marked as the read-only state and the first free pages in the at least one virtual machine with a same one of the physical memory pages, such that at least two of the shared first free pages are mapped to the same one of the physical memory pages.