new-overload

Overloading global operator new/delete in C++

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...

Recursive calls when trying to wrap and override the global operator new.

I have not programmed C++ for a while and encountered a strange behavior when toying with overloaded global operators new and delete. The essence of the problem seems to be that a wrapper build around the default global new and residing in a separate source file nevertheless calls an operator new overloaded in another (and separately c...

Difference between operator new and operator new[]?

I've overloaded the global operator new/delete/new[]/delete[] but simple tests show that while my versions of new and delete are being called correctly, doing simple array allocations and deletes with new[] and delete[] causes the implementations in newaop.cpp and delete2.cpp to be called. For example, this code int* a = new int[10]; ...