How to automatically share the memory between guest machines

Hi,

How to automatically share the memory between Virtual(guest) machines depending on the load on each guest machine?

for example, If i have 5 guest machines(VMs) and 2 of them doesn’t use all the memory that is allocated to them, in this case, is it possible to shift this memory to the 3 VMs which need more memory? and then can it be done vice-versa?

Please reply. it is bit urgent!

Thanks!