1

I successfully run my code in small data but when i tried large scaled data, it gives me

"corrupted double-linked list:"

In small data, if I delete free() functions, error is disappeared and code works, but in large data whether i put free or not, code gives this error.

Creation of malloc and using free in my code as follows,

int **msgcount = malloc(partnum*sizeof(int*));
for(i=0; i<partnum; i++)
    msgcount[i] = malloc( partnum*sizeof(int));

...lots of code

for(i=0;i<partnum;i++)
{
   free(msgcount[i]);
}
abby
  • 27
  • 1
  • 6

1 Answers1

1

This message comes from glibc and means that you faced a memory corruption or you doubly freed the same pointer. Try to run under valgrind and find where's the corruption occurred.

ivaigult
  • 6,198
  • 5
  • 38
  • 66