1.全部代码:
2.运行语句和结果:
make test
./test
valgrind test
3.运行环境:
系统: macOS Sierra 10.12.2
编辑器: Atom 1.18.0
编译器:
lemon-Mac:Cfile lemon$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/inc
lude/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
4.问题:不应该查出内存泄漏吗?为何没有?
这篇博客介绍了在macOS Sierra 10.12.2系统上使用GCC进行代码编译,并通过运行`maketest ./testvalgrindtest`检查内存泄漏的过程。然而,结果显示未检测到内存泄漏,作者对此表示疑惑。

被折叠的 条评论
为什么被折叠?



