title: How to properly replace global new & delete operators
body: <p>First of all, there were at least 4-5 topics with a similar topic on SO. I read each of them and I don't feel they really help me with this specific issue. If someone else finds a duplicate question I apologize. I've done my share of searching before I posted this, as it seems like a very common question.</p>
  
  <p>I'm using Visual Studio .NET 2003 on Windows 7.</p>
  
  <p>I have my own overloads of new/delete that point to my own custom calls to malloc() and free() for diagnostics. My new/delete overloads are in a header file which I've included in a few files.</p>
  
  <p>The problem is, the code base is pretty much spaghetti and there is no easy way to make sure these overloads get used by everything. There are includes to third party libraries that are black-box. We also use STL everywhere.</p>
  
  <p>In my tests I've found that STL is still mixing calls to my own new/delete and the standard MSVC new/delete calls.</p>
  
  <p>It doesn't seem realistic to include my header file in thousands of other files, that would just take far too long. Can anyone offer some tips on how to properly and effectively overload new/delete globally so everything uses my custom memory manager?</p>