|
void | mem_copy (void *dest, const void *source, size_t size) |
|
void | mem_move (void *dest, const void *source, size_t size) |
|
template<typename T > |
void | mem_zero (T *block, size_t size) |
|
int | mem_comp (const void *a, const void *b, size_t size) |
|
bool | mem_has_null (const void *block, size_t size) |
|
Memory management utilities.
◆ mem_comp()
int mem_comp |
( |
const void * |
a, |
|
|
const void * |
b, |
|
|
size_t |
size |
|
) |
| |
Compares two blocks of memory
- Parameters
-
a | First block of data |
b | Second block of data |
size | Size of the data to compare |
- Returns
- < 0 - Block a is less than block b.
-
0 - Block a is equal to block b.
-
> 0 - Block a is greater than block b.
◆ mem_copy()
void mem_copy |
( |
void * |
dest, |
|
|
const void * |
source, |
|
|
size_t |
size |
|
) |
| |
Copies a a memory block.
- Parameters
-
dest | Destination. |
source | Source to copy. |
size | Size of the block to copy. |
- See also
- mem_move
◆ mem_has_null()
bool mem_has_null |
( |
const void * |
block, |
|
|
size_t |
size |
|
) |
| |
Checks whether a block of memory contains null bytes.
- Parameters
-
block | Pointer to the block to check for nulls. |
size | Size of the block. |
- Returns
- true if the block has a null byte, false otherwise.
◆ mem_move()
void mem_move |
( |
void * |
dest, |
|
|
const void * |
source, |
|
|
size_t |
size |
|
) |
| |
Copies a a memory block.
- Parameters
-
dest | Destination. |
source | Source to copy. |
size | Size of the block to copy. |
- See also
- mem_copy
◆ mem_zero()
template<typename T >
void mem_zero |
( |
T * |
block, |
|
|
size_t |
size |
|
) |
| |
|
inline |
Sets a complete memory block to 0.
- Parameters
-
block | Pointer to the block to zero out. |
size | Size of the block. |