free() When we want to free a memory chunk, we give it to the free() function. This function frees the chunk, by adding it to the list of free memory chunks, and thus may be re-allocated by malloc(). Note that the pointer we had pointing to the chunk was not modified by the free() function - thus, we might accidentally try to access the same memory after it was freed.