Everything

free


Releases the specified storage area.

[Format]

#include <stdlib.h>

void free (void *ptr);

[Parameters]

ptr Address of storage area to release

[Remarks]

The free function releases the storage area pointed by ptr, to enable reallocation for use. If ptr is NULL, the function carries out nothing.

If the storage area attempted to release was not allocated by the calloc, malloc, or realloc function, or when the area has already been released by the free or realloc function, correct operation is not guaranteed. Operation result of reference to a released storage area is also not guaranteed.

The CC-RX has a security facility for detecting illegal operations to storage areas. For details, refer to the -secure_malloc option in "2.5.4 Library Generator Options".