doc
|
Functions | |
void * | c_calloc (size_t count, size_t size) |
void * | c_malloc (size_t size) |
void * | c_realloc (void *ptr, size_t size) |
char * | c_strdup (const char *str) |
char * | c_strndup (const char *str, size_t size) |
void * c_calloc | ( | size_t | count, |
size_t | size ) |
Allocates memory for an array.
Allocates memory for an array of <count> elements of <size> bytes each and returns a pointer to the allocated memory. The memory is set to zero.
count | Amount of elements to allocate |
size | Size in bytes of each element to allocate. |
References size.
void * c_malloc | ( | size_t | size | ) |
Allocates memory for an array.
Allocates <size> bytes of memory. The memory is set to zero.
size | Size in bytes to allocate. |
References size.
void * c_realloc | ( | void * | ptr, |
size_t | size ) |
Changes the size of the memory block pointed to.
Newly allocated memory will be uninitialized.
ptr | Pointer to the memory which should be resized. |
size | Value to resize. |
References size.
char * c_strdup | ( | const char * | str | ) |
Duplicate a string.
The function returns a pointer to a newly allocated string which is a duplicate of the string str.
str | String to duplicate. |
char * c_strndup | ( | const char * | str, |
size_t | size ) |
Duplicate a string.
The function returns a pointer to a newly allocated string which is a duplicate of the string str of size bytes.
str | String to duplicate. |
size | Size of the string to duplicate. |
References size.