Community
cancel
Showing results for 
Search instead for 
Did you mean: 
60 Views

Mismatched allocation/deallocation

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