Is free() zeroing out memory?
问题 Until today I lived in belief that calling free() on memory space releases it for further allocation without any other modifications. Especially, considering this SO question that clearly states that free() DOESN'T zero out memory. Yet, let's consider this piece of code (test.c): #include<stdlib.h> #include<stdio.h> int main() { int* pointer; if (NULL == (pointer = malloc(sizeof(*pointer)))) return EXIT_FAILURE; *pointer = 1337; printf("Before free(): %p, %d\n", pointer, *pointer); free