title: Overloading global operator new/delete in C++
body: <p>I am trying to overload the global operator new and delete for a performance sensitive application. I have read the concerns described at <a href="http://www.informit.com/articles/article.aspx?p=30642&amp;seqNum=3" rel="nofollow noreferrer">http://www.informit.com/articles/article.aspx?p=30642&amp;seqNum=3</a> and the recommendations to use Intel TBB's allocator <a href="http://www.intel.com/technology/itj/2007/v11i4/5-foundations/5-memory.htm" rel="nofollow noreferrer">http://www.intel.com/technology/itj/2007/v11i4/5-foundations/5-memory.htm</a> </p>
  
  <p>Since I am overloading new and delete for the first time, I have a few questions. </p>
  
  <p>Should I include my new header Allocator.h (or Pre.h) containing the overloaded new function in all files containing "new" calls? This is tedious.</p>
  
  <p>Or should I use "gcc -include Allocator.h ..." which includes Allocator.h (before) into each translation unit? I want to keep the code platform independent as much as possible. Do all compilers support something analogous to "gcc -include"?</p>