free
--------------------------------------------------------------------------------
deallocate memory
Synopsis #include
void free(void *ptr);
Description The free function deallocates a pointer previously allocated to a range of memory (by calloc or malloc) to the free memory heap. If the pointer was not previously allocated by calloc, malloc or realloc, the behavior is undefined.
The free function returns the allocated memory to the heap from which it was allocated.
Error Conditions The free function does not return an error condition.
Example #include
char *ptr;
ptr = (char *)malloc(10); /* Allocate 10 bytes from heap */
free(ptr); /* Return space to free heap */
See Also calloc, malloc, realloc
Also, there exists this information:
Tips for Working With Heaps
--------------------------------------------------------------------------------
Heaps may not start at address zero (0x0000 0000). This address is reserved and means ?no memory could be allocated?. It is the null pointer on the Blackfin platform.
So, if NULL (0x0000 0000) is not created when a pointer is declared but not yet allocated, how can I know that a pointer has not been allocated memory?
Regards,
JaaC