【问题标题】:How to get the memory used of a .exe using command prompt如何使用命令提示符获取 .exe 使用的内存
【发布时间】:2013-04-03 10:57:05
【问题描述】:

使用命令提示符,我如何获取执行 .exe 时使用的内存。例如,要查找所用时间,我可以使用 .bat 文件,如下所示:

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

我怎样才能为使用的内存做到这一点?

【问题讨论】:

    标签: memory command-line command-prompt


    【解决方案1】:

    试试这个:

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

    mem 命令的输出(示例):

    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
    

    顺便说一句。而不是time &lt;nul,你可以使用time /t

    【讨论】:

    • mem 在 Vista/Windows 7 中不可用,我不认为。
    • 或至少 64 位版本的 Windows 7。
    • Windows 7:link
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-09-11
    • 1970-01-01
    相关资源
    最近更新 更多