CAEN Utility  2.0.2
Utilities for CAEN projects
Heap allocator wrappers, optimized for the current system

Wrappers to malloc/realloc/calloc/free. More...

Functions

void * c_malloc (size_t size)
 
void * c_realloc (void *ptr, size_t size)
 
void * c_calloc (size_t nmemb, size_t size)
 
void c_free (void *ptr)
 
size_t c_malloc_size (void *ptr)
 
char * c_strdup (const char *str)
 Wrapper to strdup(str), with check for NULL arguments. To be freed with c_free(). More...
 
char * c_strndup (const char *str, size_t size)
 Wrapper to strndup(str, size), with check for NULL arguments. To be freed with c_free(). More...
 

Detailed Description

Wrappers to malloc/realloc/calloc/free.

Function Documentation

◆ c_malloc()

void* c_malloc ( size_t  size)

Definition at line 112 of file CAENMultiplatform.c.

Here is the caller graph for this function:

◆ c_realloc()

void* c_realloc ( void *  ptr,
size_t  size 
)

Definition at line 122 of file CAENMultiplatform.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ c_calloc()

void* c_calloc ( size_t  nmemb,
size_t  size 
)

Definition at line 139 of file CAENMultiplatform.c.

Here is the caller graph for this function:

◆ c_free()

void c_free ( void *  ptr)

Definition at line 149 of file CAENMultiplatform.c.

Here is the caller graph for this function:

◆ c_malloc_size()

size_t c_malloc_size ( void *  ptr)

Definition at line 171 of file CAENMultiplatform.c.

Here is the caller graph for this function:

◆ c_strdup()

char* c_strdup ( const char *  str)

Wrapper to strdup(str), with check for NULL arguments. To be freed with c_free().

Returns
a pointer to the newly allocated string. NULL in case of error.

Definition at line 204 of file CAENMultiplatform.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ c_strndup()

char* c_strndup ( const char *  str,
size_t  size 
)

Wrapper to strndup(str, size), with check for NULL arguments. To be freed with c_free().

Returns
a pointer to the newly allocated string. NULL in case of error.

Definition at line 212 of file CAENMultiplatform.c.

Here is the call graph for this function:
Here is the caller graph for this function: