|
Libft
Custom implementation of core libc functions with additional utility helpers.
|
Memory allocation utilities. More...
Functions | |
| void * | ft_calloc (size_t count, size_t size) |
| Allocates and zeroes memory for an array. | |
| bool | ft_realloc (char **buff, size_t cap, size_t newcap) |
| Reallocates a buffer to a new capacity. | |
Memory allocation utilities.
Functions for allocating and reallocating memory.
| void * ft_calloc | ( | size_t | count, |
| size_t | size ) |
Allocates and zeroes memory for an array.
| count | Number of elements. |
| size | Size of each element. |


| bool ft_realloc | ( | char ** | buff, |
| size_t | cap, | ||
| size_t | newcap ) |
Reallocates a buffer to a new capacity.
| buff | Pointer to the buffer pointer (owned, reallocated in place). |
| cap | Current capacity. |
| newcap | New capacity (0 to free the buffer). |