Free is a function to deallocate memory obtained from malloc and other functions in C. Do not use this tag to refer to free software
C library function for reallocating a dynamically allocated memory region.
"A malloc free pair can be better than a realloc if you don t need to keep around the original memory"
from question "Why is realloc eating tons of memory?"
|Even more efficient||
"If you don t mind the libc allocation functions realloc is even more efficient it wont copy the data on a shrink just mark the extra memory as free and if you grow the memory and there is memory free after it will mark the needed memory as used and not copy either"
from question "Shrinking a vector"
"Dynamic memory management on an small embedded system is tricky to begin with but realloc is no more complicated than a free and malloc of course that s not what it does"
from question "Is realloc() safe in embedded system?"