/* * memoryLeak.c * * Created on: Mar 18, 2014 * Author: carola */ #include #include int main() { /* Eclipse CDT workaround to prevent buffering of output in console.*/ setvbuf(stdout, NULL, _IONBF, 0 ); while (1) { int j; int* A = malloc(10000000*sizeof(int)); printf("A=%u\n", (unsigned)A); for (j = 0; j < 10000000; j++) A[j] = j; //free(A); } return 0; }