Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4999 Discussions

Mismatched allocation/deallocation

Jean-michel_Rouet
655 Views

Hi

with intel inspector I noticed that a very small code like this

#include <iostream>
void test(int l)
{
    char * s = new char[l];
    delete[] s;
}
 
int main(int argc, char *argv[])
{
    test(512);
    return 0
}

triggers a mismatched allocation/deallocation for the variable s;

 

This only occurs after stl headers are included (like the iostream here in this example)

Is it a bug of intel inspector ?

For background information, I'm using Visual Studio 2015, intel compiler 16 update 3, and Inspector XE 2016 Update 3 (in Parallel Studio).

Thanks for your feedbacks.

 

 

0 Kudos
0 Replies
Reply