CAEN Utility  2.0.2
Utilities for CAEN projects
Memory related function

Wrappers to memset/memcpy/memmove. More...

Functions

static void * c_zeromem (void *dest, size_t size)
 Wrapper to memset(dest, 0, size), with check for NULL arguments. More...
 
static void * c_memset (void *dest, int val, size_t size)
 Wrapper to memset(dest, val, size), with check for NULL arguments. More...
 
static void * c_memcpy (void *__restrict dest, const void *__restrict src, size_t size)
 Wrapper to memcpy(dest, src, size), with check for NULL arguments. More...
 
static void * c_memmove (void *dest, const void *src, size_t size)
 Wrapper to memmove(dest, src, size), with check for NULL arguments. More...
 

Detailed Description

Wrappers to memset/memcpy/memmove.

Note
Defined static inline to help optimization: it is fine, as they use only standard functions.
Warning
Cannot be declared as macros because arguments could be evaluated wtice

Function Documentation

◆ c_zeromem()

static void* c_zeromem ( void *  dest,
size_t  size 
)
inlinestatic

Wrapper to memset(dest, 0, size), with check for NULL arguments.

Returns
the value of dest

Definition at line 92 of file CAENMultiplatform.h.

Here is the caller graph for this function:

◆ c_memset()

static void* c_memset ( void *  dest,
int  val,
size_t  size 
)
inlinestatic

Wrapper to memset(dest, val, size), with check for NULL arguments.

Returns
the value of dest

Definition at line 96 of file CAENMultiplatform.h.

◆ c_memcpy()

static void* c_memcpy ( void *__restrict  dest,
const void *__restrict  src,
size_t  size 
)
inlinestatic

Wrapper to memcpy(dest, src, size), with check for NULL arguments.

Returns
the value of dest

Definition at line 100 of file CAENMultiplatform.h.

Here is the caller graph for this function:

◆ c_memmove()

static void* c_memmove ( void *  dest,
const void *  src,
size_t  size 
)
inlinestatic

Wrapper to memmove(dest, src, size), with check for NULL arguments.

Returns
the value of dest

Definition at line 104 of file CAENMultiplatform.h.

Here is the call graph for this function: