I'm developing an "Online Judge System",like SGU "<http://acm.sgu.ru/>" 

I wangt to obtain the accurate consumption memory of running ".exe"(.c/.cpp-->.exe) using Java.

Process : submit code-->hello.cpp/.c--compile-->hello.exe--run-->results

I want to know how to obtain the consumption memory of running "hello.exe"

The code: 

```
Runtime rn = Runtime.getRuntime();

Process proc =rn.exec("hello.exe");

```

Thank you for helping me.