How come this C program does not crash?
问题 This is from the book: Understanding and Using C Pointers If memory is re‐ peatedly allocated and then lost, then the program may terminate when more memory is needed but malloc cannot allocate it because it ran out of memory. In extreme cases, the operating system may crash. This is illustrated in the following simple example: char *chunk; while (1) { chunk = (char*) malloc(1000000); printf("Allocating\n"); } The variable chunk is assigned memory from the heap. However, this memory is not