Patent ID: 8856194

Claim:
A method of garbage collection in a virtualization environment, the virtualization environment comprising a virtual machine hypervisor, a plurality of guest operating systems and a plurality of application programs that runs on the plurality of guest operating systems wherein the plurality of application programs performs memory management using a garbage collection mechanism, the method comprising the steps of: requesting at least one guest operating system of the plurality of guest operating systems to assign a memory space for at least one application program of the plurality of application programs in response to an operating environment of the at least one application program initiating garbage collection, wherein the at least one guest operating system performs assignment of memory space to the at least one application program based on maintenance of page tables of the plurality of guest operating systems, and wherein the page tables are physical address locations of the virtualization environment at which a plurality of memory spaces of the assigned memory space are located; marking live objects in an original memory space of the at least one application program in response to the at least one guest operating system assigning the memory space for the at least one application program; replicating the marked live objects to the assigned memory space; releasing the original memory space of the at least one application program to the at least one guest operating system; determining, by the at least one guest operating system, whether there is enough memory space to be assigned to the at least one application program; assigning the memory space for the at least one application program if the determination result is positive; issuing a request by the at least one guest operating system to the virtual machine hypervisor for assigning the memory space if the determination result is negative; obtaining the memory space assigned by the virtual machine hypervisor; and assigning the memory space assigned by the virtual machine hypervisor to the at least one application program; calling, by a dynamic memory hypervisor in the at least one guest operating system, the request issued to the virtual machine hypervisor for assigning the memory space through a virtual machine kernel function.