本机C++的内存问题在Windows上的应用
我正在研究一个bad_alloc
崩溃的多线程本机CPP应用程序,从windbg中,它显然是在分配堆上的大对象时发生的(主要是basic_string ctor或与新操作员分配的一些数组分配)。从!地址-Summary
和来自Debugdiag的内存分析似乎很高,但堆的大小仍然很小(约70 MB)。
LFH Key : 0x233116ff
Termination on corruption : ENABLED
Heap Flags Reserv Commit Virt Free List UCR Virt Lock Fast
(k) (k) (k) (k) length blocks cont. heap
-----------------------------------------------------------------------------
05f60000 00000002 68964 56804 68964 8411 37570 13 2 29701
External fragmentation 14 % (37570 free blocks)
072a0000 00001002 60 4 60 2 1 1 0 0
096f0000 00001002 60 4 60 2 1 1 0 0
1f430000 00001002 60 4 60 2 1 1 0 0
-----------------------------------------------------------------------------
我想从用法表中深入了解内存,并找出更高的内存分配的原因,有关如何进一步进行的任何建议?
I'm investigating a bad_alloc
crashes for a multithreaded native cpp app, from WinDbg it's clearly happening on allocating large object on heap (mostly basic_string ctor or some array allocation with new operator). From the !address -summary
and memory analysis from DebugDiag it's seems like app memory usage is very high but heap size is still very small (around 70 MB).
LFH Key : 0x233116ff
Termination on corruption : ENABLED
Heap Flags Reserv Commit Virt Free List UCR Virt Lock Fast
(k) (k) (k) (k) length blocks cont. heap
-----------------------------------------------------------------------------
05f60000 00000002 68964 56804 68964 8411 37570 13 2 29701
External fragmentation 14 % (37570 free blocks)
072a0000 00001002 60 4 60 2 1 1 0 0
096f0000 00001002 60 4 60 2 1 1 0 0
1f430000 00001002 60 4 60 2 1 1 0 0
-----------------------------------------------------------------------------
I want to dig deep into the memory from the usage table and find out the cause of higher memory allocation, any suggestion on how to proceed further?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论