linux - 如何在 linux(OPENSUSE)中运行 dmalloc?

标签 linux

文件:main.c

为了运行 dmalloc,我完成了以下步骤。

1) gcc -ldmalloc -o test main.c

2) function dmalloc { eval command dmalloc -b $*;

dmalloc -l logfile -i 100 low

3)./测试

我从哪里得到结果?

即使我无法获取日志文件。

最佳答案

在运行程序之前确保您的环境确实包含 DMALLOC_OPTIONS 变量。不同的 shell 可能与 eval 不同。确保您确实在测试程序中执行了 malloc,否则它可能没有正确初始化。

关于linux - 如何在 linux(OPENSUSE)中运行 dmalloc?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10295775/

相关文章:

linux - Linux 端点之间的加密隧道

android - Eclipse - linux上的Egit安装路径

linux - p7zip 64 位二进制文​​件

c++ - Qt C++ 项目中 Xamarin 项目代码的可重用性

linux - 将文件从 tar 管道传输到命令

linux - 我如何让 gdb 在 linux 下使用 D 程序?

c++ - 读取 .oni 文件会导致乱序帧

通过链接到其他 .so 和 .a 文件的组合来创建 .so

python - 无法终止使用 Python 子进程启动的 Jar 文件

linux - Shell 脚本无法识别 heredoc 分隔符