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__<
What you could do is to overload the operator new and get the stack trace there (platform specific) and use the stack information to deduce from where new was called.