c++ - Debug heap/STL debugging equivalent for GCC? -


I am planning to use GCC more (Linux and Windows) and I was wondering if MSWC is equal to and available for this. GCC CRT & STL

I already know about devices like Valgrind, but I'm looking for something built into libraries. I am not very familiar with debug stacks and STL checks, but when I have a memory problem in Linux in GCC, I use an environment variable named MALLOC_CHECK_ ( From Molok (3)):

The latest version of Linux Libse (later 5.4.23) and GNU Libse (2.x) includes a Molok implementation that tune through the environment variable When MALLOC_CHECK_ is set, then a special (less efficient) implementation N is used which is designed to be simple with simple errors, such as double calls free () such as the same argument, or a single byte (up-to-one bug). Can not be safe, however, and memory leaks can result. If MALLOC_CHECK_ is set to 0, then no one knows that the heap corruption has been silently ignored; if set to 1, so The diagnosis is printed on stderr; if set to 2, then abort () is said immediately. This can be useful because otherwise an accident can occur very later, and the correct reason for the problem is to track down It is only difficult.

There is also an electric fence that can help in catching buffer overruns as soon as degradation / walking down, as soon as miscarriage happens, see for more information.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -