I am trying to overload the global operator new and delete for a performance sensitive application. I have read the concerns described at http://www.informit.com/articles/article.aspx?p=30642&seqNum=3 and the recommendations to use Intel TBB's allocator http://www.intel.com/technology/itj/2007/v11i4/5-foundations/5-memory.htm
Since I am overloading new and delete for the first time, I have a few questions.
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.
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"?