free chunks before terminate
This commit is contained in:
parent
9c85f88333
commit
feec2b7de8
1 changed files with 6 additions and 0 deletions
|
@ -68,6 +68,12 @@ int main(int argc, char** argv)
|
|||
printf("malloc(%d)\tCHUNK: %d START: %p END: %p\n", size, i, test[i], test[i] + size);
|
||||
}
|
||||
|
||||
// and release again
|
||||
for (i = 0; i < chunks; i++) {
|
||||
free(test[i]);
|
||||
printf("free(%p)\tCHUNK: %d\n", test[i], i);
|
||||
}
|
||||
|
||||
free(test);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue