【发布时间】:2011-03-27 14:41:16
【问题描述】:
我正在开发一个“在线裁判系统”,比如 SGU "http://acm.sgu.ru/"
我想获取使用Java运行“.exe”(.c/.cpp-->.exe)的准确消耗内存。
流程:提交代码-->hello.cpp/.c--编译-->hello.exe--运行-->结果
我想知道如何获取运行“hello.exe”的消耗内存
代码:
Runtime rn = Runtime.getRuntime();
Process proc =rn.exec("hello.exe");
谢谢你帮助我。
【问题讨论】: