我目前正在调查应用程序为 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/