How to get the memory used of a .exe using command prompt

一曲冷凌霜 提交于 2019-12-11 19:17:44

问题


Using the command prompt, how can i get the memory used when executing a .exe. For example, to find the time taken i can use a .bat file as follows:

@echo off
time < nul
Function.exe
time < nul

How can i do this for memory used?


回答1:


Try this:

@echo off
mem | find "available to MS-DOS"
function.exe
mem | find "available to MS-DOS"

Output from the mem command (example):

655360 bytes total conventional memory
655360 bytes available to MS-DOS
599312 largest executable program size

1048576 bytes total contiguous extended memory
     0 bytes available contiguous extended memory
941056 bytes available XMS memory
       MS-DOS resident in High Memory Area

Btw. instead of time <nul you can use time /t.



来源:https://stackoverflow.com/questions/15785457/how-to-get-the-memory-used-of-a-exe-using-command-prompt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!