主权项 |
1. A memory management method applied to a computer device, the computer device comprising a memory component, a host operating system (OS), a monitoring module and a virtual machine, with a guest operating system (OS), the memory management method comprising:
sharing, through the host OS, a memory space of the memory component via a network; mounting, through the virtual machine, the shared memory space via the network; monitoring through the guest OS, a memory utilization of a virtual memory of the virtual machine; allocating a storage block of the memory space to the virtual machine in a condition that the memory utilization of the virtual memory of the virtual machine is greater than an upper bound, so as to increase a capacity of the virtual memory of the virtual machine; recording a relationship between the storage block and the virtual machine into a database; monitoring, through the monitoring module, the virtual machine to determine whether the virtual machine fails; cancelling the allocation of the storage block allocated to the virtual machine according to the relationship in a condition that the virtual machine fails; and deleting the relationship between the storage block and the virtual machine in the database. |