Patent ID: 8725963

Claim:
A system for sharing memory among multiple Containers, the system comprising: an operating system (OS); a random access memory (RAM) for storing currently used memory pages; a SWAP storage for storing memory pages that are currently not in use; a plurality of Virtual Environments (VEs) running under the OS, and sharing services of the OS; at least one VE process running in each VE; a VE RAM implemented under the OS; a virtual SWAP storage implemented under the OS; a memory manager that provides access to the RAM by the VE process; wherein: when the VE process requests memory from the OS, the memory manager allocates memory pages in the RAM and allocates memory pages for the VE process in the VE RAM, if the VE RAM has no free space, the VE process pages are moved to the virtual SWAP storage, if the VE process requires a memory page stored in the virtual SWAP storage, the page is loaded to the RAM, and if the process page in the RAM is not currently in use, the page is moved to the SWAP storage, wherein, if the memory page required by the VE process is not in the virtual SWAP storage, a system process finds the memory page in a least recently used set and writes it to the SWAP storage.