• <tfoot id='m5NyX'></tfoot><legend id='m5NyX'><style id='m5NyX'><dir id='m5NyX'><q id='m5NyX'></q></dir></style></legend>

        <small id='m5NyX'></small><noframes id='m5NyX'>

          <bdo id='m5NyX'></bdo><ul id='m5NyX'></ul>

        <i id='m5NyX'><tr id='m5NyX'><dt id='m5NyX'><q id='m5NyX'><span id='m5NyX'><b id='m5NyX'><form id='m5NyX'><ins id='m5NyX'></ins><ul id='m5NyX'></ul><sub id='m5NyX'></sub></form><legend id='m5NyX'></legend><bdo id='m5NyX'><pre id='m5NyX'><center id='m5NyX'></center></pre></bdo></b><th id='m5NyX'></th></span></q></dt></tr></i><div id='m5NyX'><tfoot id='m5NyX'></tfoot><dl id='m5NyX'><fieldset id='m5NyX'></fieldset></dl></div>
      1. 如何在C++中获取Windows下的内存使用情况

        时间:2023-07-19

      2. <i id='bzct4'><tr id='bzct4'><dt id='bzct4'><q id='bzct4'><span id='bzct4'><b id='bzct4'><form id='bzct4'><ins id='bzct4'></ins><ul id='bzct4'></ul><sub id='bzct4'></sub></form><legend id='bzct4'></legend><bdo id='bzct4'><pre id='bzct4'><center id='bzct4'></center></pre></bdo></b><th id='bzct4'></th></span></q></dt></tr></i><div id='bzct4'><tfoot id='bzct4'></tfoot><dl id='bzct4'><fieldset id='bzct4'></fieldset></dl></div>
            <tbody id='bzct4'></tbody>

        • <legend id='bzct4'><style id='bzct4'><dir id='bzct4'><q id='bzct4'></q></dir></style></legend>
              <bdo id='bzct4'></bdo><ul id='bzct4'></ul>

              <tfoot id='bzct4'></tfoot>
              1. <small id='bzct4'></small><noframes id='bzct4'>

                • 本文介绍了如何在C++中获取Windows下的内存使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我试图从程序本身中找出我的应用程序消耗了多少内存.我要查找的内存使用情况是 Windows 任务管理器进程"选项卡上内存使用情况"列中报告的数字.

                  I am trying to find out how much memory my application is consuming from within the program itself. The memory usage I am looking for is the number reported in the "Mem Usage" column on the Processes tab of Windows Task Manager.

                  推荐答案

                  一个好的起点是 GetProcessMemoryInfo,报告有关指定进程的各种内存信息.您可以将 GetCurrentProcess() 作为进程句柄传递,以获取有关调用进程的信息.

                  A good starting point would be GetProcessMemoryInfo, which reports various memory info about the specified process. You can pass GetCurrentProcess() as the process handle in order to get information about the calling process.

                  可能 PROCESS_MEMORY_COUNTERSWorkingSetSize 成员与任务管理器中的 Mem Usage coulmn 最接近,但它不会完全相同.我会尝试使用不同的值来找到最接近您需求的值.

                  Probably the WorkingSetSize member of PROCESS_MEMORY_COUNTERS is the closest match to the Mem Usage coulmn in task manager, but it's not going to be exactly the same. I would experiment with the different values to find the one that's closest to your needs.

                  这篇关于如何在C++中获取Windows下的内存使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:使 std::vector 分配对齐的内存 下一篇:内存泄漏是“未定义的行为"吗?C++中的类问题?

                  相关文章

                    <small id='z8pIU'></small><noframes id='z8pIU'>

                    <tfoot id='z8pIU'></tfoot>

                      <bdo id='z8pIU'></bdo><ul id='z8pIU'></ul>
                  1. <i id='z8pIU'><tr id='z8pIU'><dt id='z8pIU'><q id='z8pIU'><span id='z8pIU'><b id='z8pIU'><form id='z8pIU'><ins id='z8pIU'></ins><ul id='z8pIU'></ul><sub id='z8pIU'></sub></form><legend id='z8pIU'></legend><bdo id='z8pIU'><pre id='z8pIU'><center id='z8pIU'></center></pre></bdo></b><th id='z8pIU'></th></span></q></dt></tr></i><div id='z8pIU'><tfoot id='z8pIU'></tfoot><dl id='z8pIU'><fieldset id='z8pIU'></fieldset></dl></div>

                    1. <legend id='z8pIU'><style id='z8pIU'><dir id='z8pIU'><q id='z8pIU'></q></dir></style></legend>