Simple Graphics Library 1.0.0.0
Runtime-independent image processing primitives
Loading...
Searching...
No Matches
Memory operations

Runtime-independent byte copy and fill functions. More...

Functions

void * sgl_memcpy (void *destination, const void *source, sgl_size_t size)
 Copies bytes between non-overlapping memory ranges.
 
void * sgl_memset (void *destination, sgl_int32_t value, sgl_size_t size)
 Fills a memory range with one byte value.
 

Detailed Description

Runtime-independent byte copy and fill functions.

Function Documentation

◆ sgl_memcpy()

void * sgl_memcpy ( void *  destination,
const void *  source,
sgl_size_t  size 
)

Copies bytes between non-overlapping memory ranges.

Parameters
[out]destinationWritable range containing at least size bytes.
[in]sourceReadable range containing at least size bytes.
[in]sizeNumber of bytes to copy.
Returns
destination.
Precondition
The two ranges do not overlap. Use with a zero size is valid.

◆ sgl_memset()

void * sgl_memset ( void *  destination,
sgl_int32_t  value,
sgl_size_t  size 
)

Fills a memory range with one byte value.

Parameters
[out]destinationWritable range containing at least size bytes.
[in]valueValue whose low eight bits are stored in each byte.
[in]sizeNumber of bytes to set.
Returns
destination.