| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
借人气问个问题。开发OJ,该怎么检测执行时间很短的程序的内存?现在在做OJ,遇到了一个问题。怎么检测执行时间很短的程序的内存。 譬如A+B problem问题 希望知道这个程序执行过程中的内存最大占用量。。 我是fork一个子进程然后用exec函数执行个程序 父进程监视proc/pid/statm. 但因为运行时间实在太短. 一般检测到子进程信息时子进程已经进入到僵死状态(zombie)资源已经都被释放,监测到的结果是0kb了。 有什么方法能延缓子进程进入到zombie状态的速度 或者有另外检测短时间程序内存占用的方法么?? 有开发过oj的人能说一下检测执行时间很短的程序的内存是用的什么方法么? 谢谢 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator