safec  3.0
Safe C Library - ISO TR24731 Bounds Checking Interface
mem_primitives_lib.h File Reference
+ This graph shows which files directly or indirectly include this file:

Functions

void mem_prim_move (void *dest, const void *src, uint32_t len)
 Moves at most len of bytes from src to dest. More...
 
void mem_prim_move8 (uint8_t *dest, const uint8_t *src, uint32_t len)
 Moves at most len of uint8_t's from src to dest. More...
 
void mem_prim_move16 (uint16_t *dest, const uint16_t *src, uint32_t len)
 Moves at most len uint16_t's from src to dest. More...
 
void mem_prim_move32 (uint32_t *dest, const uint32_t *src, uint32_t len)
 Moves at most len of uint32_t's from src to dest. More...
 
void mem_prim_set (void *dest, uint32_t len, uint8_t value)
 Sets len bytes starting at dest to the specified value. More...
 
void mem_prim_set16 (uint16_t *dest, uint32_t len, uint16_t value)
 Sets len uint16_t's starting at dest to the specified value. More...
 
void mem_prim_set32 (uint32_t *dest, uint32_t len, uint32_t value)
 Sets len uint32_t's starting at dest to the specified value. More...
 

Function Documentation

◆ mem_prim_move()

void mem_prim_move ( void *  dest,
const void *  src,
uint32_t  len 
)

Moves at most len of bytes from src to dest.

Dest may overlap with src.

Parameters
[out]destpointer to the memory that will be replaced by src.
[in]srcpointer to the memory that will be copied to dest
[in]lenmaximum number bytes of src that can be copied

◆ mem_prim_move8()

void mem_prim_move8 ( uint8_t *  dest,
const uint8_t *  src,
uint32_t  len 
)

Moves at most len of uint8_t's from src to dest.

The destination may overlap with source.

Parameters
[out]destpointer to the memory that will be replaced by src
[in]srcpointer to the memory that will be copied to dest
[in]lenmaximum number uint8_t of src that can be copied

◆ mem_prim_move16()

void mem_prim_move16 ( uint16_t *  dest,
const uint16_t *  src,
uint32_t  len 
)

Moves at most len uint16_t's from src to dest.

The destination may overlap with source.

Parameters
[out]destpointer to the memory that will be replaced by src.
[in]srcpointer to the memory that will be copied to dest
[in]lenmaximum number uint16_t of src that can be copied

◆ mem_prim_move32()

void mem_prim_move32 ( uint32_t *  dest,
const uint32_t *  src,
uint32_t  len 
)

Moves at most len of uint32_t's from src to dest.

The destination may overlap with source.

Parameters
[out]destpointer to the memory that will be replaced by src.
[in]srcpointer to the memory that will be copied to dest
[in]lenmaximum number uint32_t of sp that can be copied

◆ mem_prim_set()

void mem_prim_set ( void *  dest,
uint32_t  len,
uint8_t  value 
)

Sets len bytes starting at dest to the specified value.

Parameters
[out]destpointer to memory that will be set to value
[in]lennumber of bytes to be set
[in]valuebyte value

◆ mem_prim_set16()

void mem_prim_set16 ( uint16_t *  dest,
uint32_t  len,
uint16_t  value 
)

Sets len uint16_t's starting at dest to the specified value.

Pointers must meet system alignment requirements.

Parameters
[out]destpointer to memory that will be set to value
[in]lennumber of uint16_ts to be set
[in]valueuint16_t value

◆ mem_prim_set32()

void mem_prim_set32 ( uint32_t *  dest,
uint32_t  len,
uint32_t  value 
)

Sets len uint32_t's starting at dest to the specified value.

Pointers must meet system alignment requirements.

Parameters
[out]destpointer to memory that will be set to value
[in]lennumber of uint32_t's to be set
[in]valueuint32_t value