Patent attributes
Disclosed are examples of memory allocation and reallocation for virtual machines operating in a shared memory configuration creating a swap file for at least one virtual machine. One example method may include allocating guest physical memory to the swap file to permit the at least one virtual machine to access host physical memory previously occupied by the guest physical memory. The example method may also include determining whether an amount of available host physical memory is below a minimum acceptable level threshold, and if so then freeing at least one page of host physical memory and intercepting a memory access attempt performed by the at least one virtual machine and allocating host physical memory to the virtual machine responsive to the memory access attempt.