Custom memory allocator (nedmalloc) crashes when compiled with Intel C++
My C++ project overloads new and delete operators globally and uses Nedmalloc instead of default allocator. The project works when compiled with MSVC but it crashes when compiled with Intel C++ Compiler with /O2 optimization (all other optimization switches are off) and the point of crash is always isnide the memory delete operation. Crashes are not constant - sometimes the application may start and work for a long time, sometimes it crashes right after the start. When rolling back to the default allocator (commenting the operators overloading code) the project works without crashes when compiled by Intel with any optimizations.
When all optimizations are disabled the projects works just fine even when compiled with Intel Compiler and with Nedmalloc activated. Lots of experiments and contacts with Nedmalloc's author led to a conclusion that there is nothing worng with nedmalloc itself, the way the project compiled and optimized is the cause of malfunctions.
I'm out of ideas and would be very thankful for any hints on what to try to make the project compiled by Intel Compiler correctly. May be some samples or links on global new and delete operators overloading, may be examples of 3rd party memory allocators usage, may be some compiler options that may affect my situation ... anything.