My application is making many memory allocations. A lot of C++ objects are created an destroyed in a short period of time.
The application is also using few threads under the same process, and few processes. (each process has few threads).
I would like to overwrite the new and delete operators of my objects, in order to make memory allocation more efficient.
I saw at the MSDN an example of how to do it with Heap functions.
1. should i use the idea of this sample or should i write my own memory allocator (which the new "new" and "delete" operators will use)
2. are there any recommended ways to write a memory allocator ?
3. Any available sources on the internet ?
4. What are the advantages and disadvantages of each way
5. I guess I'm not aware of all the issues concerning my problem, and will be glad to hear about it.
Please state comments only.
I will divide more than 200 points for this question, between those who give me good comments.