...
| Code Block |
|---|
void * malloc(size_t size); void * calloc(size_t nmemb, size_t size); void * realloc(void *ptr, size_t size); void free(void *ptr); |
The specific characteristics of these routines are based on the compiler used. With a few exceptions, this document only considers the general and compiler-independent attributes of these routines.
...
Use the sizeof operator correctlyUse variables of type size_t for size parameters to memory allocation routines
References
- Seacord 05 Chapter 4 Dynamic Memory Management