c++ - 如何分辨已提交和保留内存中的内容?

标签 c++ windbg crash-dumps

我目前正在调查应用程序为 C++ 应用程序使用大量私有(private)内存的问题。根据转储分析,看起来很多都在已提交和保留的内存中。

我使用 Windbg。有什么办法可以看到提交和保留内存中到底有什么?我已将其缩小到一个特定的堆。

我的理论是它不会被发布。我无法实时调试,我只能继续转储。

任何建议都会有所帮助。

最佳答案

!address -Filter 应该能够提供该信息。以下是不同的过滤器选项。

MEM_COMMIT :- All memory that is currently committed for use by the target. Physical storage has been allocated for this memory, in physical memory or in the page file.

MEM_RESERVE :- All memory that is reserved for future use by the target. No physical storage is allocated for this memory.

MEM_FREE :- All available memory in the target's virtual address space. This memory includes all memory that has not been committed or reserved. This Filter value is the same as RegionUsageFree.

关于c++ - 如何分辨已提交和保留内存中的内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5950623/

相关文章:

debugging - 错误: Symbol file could not be found.windbg.exe

c++ - 解码抛出的 C++ 异常的参数 (0xE06D7363)

Android 崩溃执行 C++ 代码无法使用 adb shell 复制

c++ - 如何遍历 luabind 类(在 lua 或 c++ 中)?

c# - 尝试使用 CLR MD 查找对象根

c++ - 实现字符串(城市)图的最简单方法是什么?

kernel - 如何使用 WinDbg 创建内核转储

c# - 为 Mono C# 应用程序生成核心转储

c# - 判断程序是否崩溃

c++ - 适用于 iOS 和 Android 的 C++ 文件操作