标签: memory-leak-detector

使用仪器 - 用设备泄漏

我开始在iPhone 3G上使用Instruments-Leaks.当我尝试使用iPhone上的Instruments运行应用程序时,我获得了

Target failed to run: Remote exception encountered: 'Failed to get task for pid 280'
Run Code Online (Sandbox Code Playgroud)

想法?

我用仪器运行应用程序的唯一一次运行速度非常慢,我无法测试它.在搜索泄漏的设备上运行应用程序的步骤是什么?

memory-leaks instruments memory-leak-detector ios

57
推荐指数
3
解决办法
1万
查看次数

如何使用Homebrew在MacOS Mojave(10.14)上安装Valgrind?

我尝试用命令安装Valgrind brew install Valgrind并且我收到一条消息"valgrind:由于上游不兼容,这个公式要么不能在比Sierra更新的macOS版本上按预期编译或运行.错误:不满意的要求使这个版本失败."

我尝试使用该命令安装brew intall --HEAD Valgrind,在成功安装依赖项autoconf,automake和libtool后,当它尝试安装valgrind时,我收到配置错误:
"Valgrind适用于Darwin 10.x,11.x,12.x, 13.x,14.x,15.x,16.x和17.x(Mac OS X 10.6/7/8/9/10/11和macOS 10.12/13)"

我的操作系统是macOs Mojave(10.14),那么这是否意味着我无法安装一个功能正常的Valgrind和Homebrew?

macos homebrew valgrind memory-leak-detector

49
推荐指数
6
解决办法
3万
查看次数

是否有适用于Python3的工作内存分析器

在Python 2中有一些工具,但一切似乎都是旧的和过时的.

我发现了PySizer和Heapy但是一切似乎都是面向Python2的,需要付出很多努力来移植.

objgraph很有趣,但仍然不是一个完全工作的分析器

使用哪种工具?

python profiling memory-profiling memory-leak-detector python-3.x

33
推荐指数
1
解决办法
9116
查看次数

如何使用 Homebrew 在 macOS Catalina (10.15) 上安装 Valgrind?

我尝试使用命令“brew install valgrind”安装 Valgrind,我收到一条消息:

“valgrind:由于上游不兼容,此公式无法在比 Sierra 更新的 macOS 版本上按预期编译或运行。错误:未满足的要求使此构建失败。”

我还尝试在代码的头部部分“brew edit valgrind”并用“git://sourceware.org/git/valgrind.git”替换“sourceware.org/git/valgrind.git”,然后在Iterm上写“ brew install --HEAD valgrind“但它给了我:

Last 15 lines from /Users/m/Library/Logs/Homebrew/valgrind/02.configure:
checking for gcc-ar... no
checking for perl... /usr/bin/perl
checking for gdb... /no/gdb/was/found/at/configure/time
checking dependency style of clang... none
checking for diff -u... yes
checking for clang option to accept ISO C99... none needed
checking for a supported version of gcc... ok (clang-11.0.0)
checking build system type... x86_64-pc-darwin
checking host system type... x86_64-pc-darwin
checking for a supported CPU... ok …
Run Code Online (Sandbox Code Playgroud)

macos homebrew valgrind memory-leak-detector macos-catalina

30
推荐指数
1
解决办法
3万
查看次数

检测C程序中的内存泄漏?

如果我们想检查C++程序中的内存泄漏,我们可以重载newdelete运算符来跟踪分配的内存.如果我们想检查C程序中的泄漏怎么办?由于C中没有运算符重载,我们是否可以覆盖malloc函数指针来拦截调用malloc和跟踪内存分配?没有使用任何外部工具有没有更简单的方法?请提供一些代码,因为我不熟悉覆盖方法指针.

注意:我想在没有任何外部实用程序的情况下执行此操作.

c memory-leak-detector

25
推荐指数
3
解决办法
5万
查看次数

Perfmon计数器检查内存泄漏

我想检查一下我服务中的内存泄漏问题.我试过以下一组perfmon计数器.

  1. 所有堆中的.NET CLR内存\#字节
  2. .NET CLR内存\ Gen 2堆大小
  3. .NET CLR Memory \#GC句柄
  4. .NET CLR Memory \#固定对象
  5. .NET CLR Memory\#total committed Bytes
  6. .NET CLR Memory\#total保留字节数
  7. .NET CLR内存\大对象堆大小

我在这里提到了上面的集合

还提到以下集:

  1. 内存/可用字节
  2. 内存/承诺字节
  3. 流程/私有字节
  4. 进程/页面文件字节
  5. 处理/处理计数

我在这里提到了上面的集合

是否有任何参数/标准或任何其他最佳方法来识别内存泄漏的perfmon计数器?
任何人都可以建议我使用一组计数器来检查内存泄漏吗?或以上设置涵盖内存泄漏?

performance memory-leaks perfmon performancecounter memory-leak-detector

21
推荐指数
1
解决办法
5万
查看次数

Chrome Dev Tools API和Selenium WebDriver

我正在尝试使用Selenium Web Driver来自动化我的浏览器集成测试.我看到Chrome Dev Tools附带了一个控制台API,用于从JavaScript内部调用某些开发工具功能.

理想情况下,从我的Java/JUnit集成测试中,我可以启动Chrome Dev Tool内存分析器(可能还有其他一些工具),运行我的WebDriver测试(实例化Chrome浏览器实例,操作DOM元素等),然后停止探查器,然后检查探查器的结果,看看是否有任何内存泄漏.

这个概念是否可行,还是我出去吃午饭?为什么/为什么不呢?

似乎API已经有了console.profile()启动分析会话,并且a console.profileEnd().所以理论上我可以让WebDriver调用这两个方法并在它们之间运行测试.

我认为缺失的链接然后以编程方式与分析会话的结果进行交互...

integration-testing profiling memory-leak-detector google-chrome-devtools selenium-webdriver

18
推荐指数
2
解决办法
7908
查看次数

Visual C++ - 内存泄漏检测

有什么建议?这篇SO帖子讨论了Visual Leak Detector,但我正在寻找其他工具.另外,请不要推荐这个.

c++ memory-leaks visual-c++ memory-leak-detector visual-leak-detector

11
推荐指数
2
解决办法
2万
查看次数

什么是`静态字符THIS_FILE [] = __FILE __;`?

有什么意义static char THIS_FILE[] = __FILE__;

简介:它有什么作用?它从何而来?

MFC,Microsoft的Windows原生类库,有一个DEBUG_NEW跟踪内存分配的宏和它们发生的位置(在用户代码中).

为此,VS向导将以下代码块放入每个cpp文件中:( 不在头文件中)

#ifdef _DEBUG
    #define new DEBUG_NEW
    #undef THIS_FILE
    static char THIS_FILE[] = __FILE__;
#endif
Run Code Online (Sandbox Code Playgroud)

并且调试新宏定义为(in afx.h):

#define DEBUG_NEW new(THIS_FILE, __LINE__)
Run Code Online (Sandbox Code Playgroud)

整个机器将产生有意义的泄漏检测输出,如:

Detected memory leaks!
Dumping objects ->
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {615} normal block at 0x04081CE0, 56 bytes long.
 Data: <¬9Í]            > AC 39 CD 5D 13 00 00 00 13 00 00 00 01 00 00 00 
c:\my\dev\path\myfile.cpp(237) : {614} normal block at 0x04087FC0, 4 bytes long. …
Run Code Online (Sandbox Code Playgroud)

mfc memory-leaks visual-c++ visual-studio-debugging memory-leak-detector

10
推荐指数
1
解决办法
3168
查看次数

Visual Studio 2017的Visual Leak Detector:没有源代码行号

我尝试使用带有Visual Studio 2017的Visual Leak Detector和平台工具集"Visual Studio 2017"我已经设置了include目录和库目录.正在生成调试信息.加载了exe的符号.

(如果我将平台工具集更改为"Visual Studio 2013"​​,它可以工作)

使用Toolset"Visual Studio 2017"VLD检测泄漏但不解决行号:

Visual Leak Detector read settings from: C:\Program Files (x86)\Visual Leak Detector\vld.ini
Visual Leak Detector Version 2.5.1 installed.
WARNING: Visual Leak Detector detected memory leaks!
---------- Block 1 at 0x005ECDB8: 400 bytes ----------
  Leak Hash: 0x36672640, Count: 1, Total 400 bytes
  Call Stack (TID 6284):
    ucrtbased.dll!malloc()
    ConsoleApplication6.exe!0x00361FAD()
    ConsoleApplication6.exe!0x003618BC()
    ConsoleApplication6.exe!0x00361828()
    ConsoleApplication6.exe!0x00361883()
    ConsoleApplication6.exe!0x00361F7E()
    ConsoleApplication6.exe!0x00361DE0()
    ConsoleApplication6.exe!0x00361C7D()
    ConsoleApplication6.exe!0x00361F98()
    kernel32.dll!BaseThreadInitThunk() + 0x12 bytes
    ntdll.dll!RtlInitializeExceptionChain() + 0x63 bytes
    ntdll.dll!RtlInitializeExceptionChain() + 0x36 bytes
Run Code Online (Sandbox Code Playgroud)

也许有人知道一种启用行号解析的方法.

谢谢

memory-leak-detector visual-leak-detector visual-studio-2017

10
推荐指数
1
解决办法
7504
查看次数