> I'm probably just talking to myself here, but anyway... > mingw with -O3 assigns the new operator to malloc(). > mingw with -O0 assigns the new operator to the overloaded version that calls > malloc_file_line(). > This happens when using the makefile to build, even when chd.c is the only thing > being explicitly compiled. > > Can someone explain to me why it happens? > > This is the cause of the untracked memory bug. > When the new operator calls the malloc_file_line(), the problem goes away.
You're talking to at least me, but man, I've got nothing. That sounds like some weird behavior for sure. You can imagine a compiler thinking it's being smart by throwing away "redundant" code or something with a higher optimization level, but clearly smart isn't the proper word here...
Andrew
|