gpt4 book ai didi

memory - 如何获取函数消耗的内存

转载 作者:行者123 更新时间:2023-12-04 07:08:47 25 4
gpt4 key购买 nike

我们的应用程序消耗大量内存,我们需要确定哪个函数导致内存的最大使用量。他们有什么方法甚至任何现有的工具可以做到这一点(Windows,Native)?

这里是环境:

视窗 XP

VS2008

native C++(基于 MFC)

非常感谢。

最佳答案

如果您有 Visual Studio 2008 Team System,您可以使用 built-in memory allocation分析器。这是一篇很好的 MSDN 文章,Find Application Bottlenecks with Visual Studio Profiler使用 VS2008。还有一个分析器 blog .

RedGate's ANTS

MemProfiler

ValGrind (自由)

编辑:由于您已更新为指示 C++,因此还请参阅此 SO answer .

也可以看看:

.NET Memory Profiling Tools

Does anyone here have a favorite memory profiling/memory leak tool they like to use for their java webapps?

Best .NET memory and performance profiler?

关于memory - 如何获取函数消耗的内存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/688320/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com