Hi,
ESXi has memory management and memory sharing and swapping techniques.
For example, ESXi resource scheduler can reclaim memory from a guest VM by using balloon driver that installed with VMware tools.
Or, the host can share memory pages between similar guest OSes by TPS.
For more information, please read this document: http://pubs.vmware.com/vsphere-51/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-51-resourc...