I know Microsoft compilers initialize memory with distinct fill patterns to indicate the state of memory (newly allocated, freed, uninitialized etc). Does gcc (4.6.1) do this? If so, where are the patterns documented? I’m seeing this pattern in a buffer and wondering if the compiler set it or some other code that I haven’t found yet: 0x01010101
I know Microsoft compilers initialize memory with distinct fill patterns to indicate the state
Share
GCC does not do this.
Whatever C library you are happening to use might well do. I believe Glibc has some protection against double frees and heap corruption, although I’m not sure where it’s documented, but you can find the Glibc home page here and the sources here.