How to get 'used memory'?

First of all, I would like to say 'thank you' to all you guys for
reading this.

I have been trying to find a solution to get the 'used memory' on
windows via Ruby.

The function is supposed to be similar to the 'freeMemory()' or
'totalMemory' in Java.

Can anyone please advise me how to get the precise memory figures?

Thank you.

Green