I have enabled MALLOC_CHECK_
by setting it to 1 (tried with 2 and 3 as well) But I don't see it reporting any issues with the following c++ program:
int n = atoi(argv[1]);
std::cout<<"n = "<<n<<std::endl;
char *buf = new char[n];
for (int i = 0;i < n*n; i++)
{
buf++;
*buf = 'x';
}
std::cout<<"done"<<std::endl;
Am I missing something here ?