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

2019-09-02 10:47发布

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条回答
Luminary・发光体
2楼-- · 2019-09-02 11:43

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.

查看更多
登录 后发表回答