本文介绍了调试堆/ STL调试等效GCC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我计划使用GCC更多(Linux和Windows),我想知道是否有一个等价的MSVC 和可用于GCC CRT和STL。

I plan on using GCC more (Linux and Windows) and I was wondering if there's an equivalent of the MSVC debug heap and the STL checks available for the GCC CRT and STL.

我已经了解了Valgrind等工具,但我正在寻找一些内置的库。

I already know about tools such as Valgrind, but I'm looking for something built in the libraries.

推荐答案

我不太熟悉调试堆和STL检查,但是当我在Linux上的内存问题我使用一个名为MALLOC_CHECK_的环境变量(来自malloc(3)):

I'm not too familiar with the debug heap and STL checks, but when I have memory problems in GCC on linux I use an environment variable called MALLOC_CHECK_ (from malloc(3)):

还有电篱笆,它可以帮助抓住缓冲区溢出,一旦超限/欠载发生,中止。有关详情,请参见。

There is also Electric Fence which can help catch buffer overruns aborting as soon as the overrun / underrun happens. See libefence(3) for more information.

这篇关于调试堆/ STL调试等效GCC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 19:53