I would like to know how much of memory is free and used my java program.

I have used Runtime.totalMemory and freeMemory() functions. However, how come used memory is so different than java.exe...