Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Custom memory allocator (nedmalloc) crashes when compiled with Intel C++

romant73
Beginner
301 Views
Hi All,

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.

Thanks in dvance for any information.
0 Kudos
2 Replies
romant73
Beginner
301 Views
Looks like I have found the reason ... here it is. Question to Intel people: which version of the compiler will contain the fix ?
0 Kudos
JenniferJ
Moderator
301 Views

see http://software.intel.com/en-us/forums/topic/294594 for response. it is not something can be fixed in the compiler.

Jennifer

0 Kudos
Reply