It depends with vmware. Remeber that the ESXi will take some memory, the rest of the memory you can statically assign to each VM or put it in a pool. You can then overprovision memory and it will use shares to figure how many memory/cpu cycles each vm gets. For instance you can give each VM 2GB RAM but one VM high shares and one low. The VM that has the high shares will get 4 times the cycles then the one with the low shares.
Basically if the VMs aren't using the full 2GB (let's say each one only needs 512MB RAM than you will have no contention). If you have contention than ESXi will dole out resouces based on what you define