Is it possible to create macros to replace all forms of operator new with overloads that include additional args...say __FILE__ and __LINE__<
operator new
__FILE__
__LINE__<
You don't say what compiler you are using, but at least with GCC, you can override new and log the caller address, then later translate that to file/line information with addr2line (or use the BFD library to do that immediately).