WKern
Loading...
Searching...
No Matches
memutil.c File Reference
#include <mem/kmem.h>

Go to the source code of this file.

Functions

void Kmemset (void *ptr, unsigned char value, unsigned int num)
 Set memory to a value.
void * Kmemcpy (void *dest, const void *src, unsigned int count)
 Copy memory.
int Kmemcmp (const void *a, const void *b, size_t n)
 Compare memory.

Function Documentation

◆ Kmemcmp()

int Kmemcmp ( const void * a,
const void * b,
size_t n )

Compare memory.

Compares the first n bytes of two memory areas.

Parameters
aPointer to the first memory area.
bPointer to the second memory area.
nNumber of bytes to compare.
Returns
An integer less than, equal to, or greater than zero if the first differing byte in a is found to be less than, equal to, or greater than the corresponding byte in b. Returns 0 if all n bytes are equal.

Definition at line 59 of file memutil.c.

◆ Kmemcpy()

void * Kmemcpy ( void * dest,
const void * src,
unsigned int count )

Copy memory.

Parameters
void*dest - Pointer to memory destination
void*src - Pointer to source memory
u32count - Amount of bytes to be copied

Definition at line 38 of file memutil.c.

◆ Kmemset()

void Kmemset ( void * ptr,
unsigned char value,
unsigned int num )

Set memory to a value.

Parameters
void*ptr - Pointer to memory which is to be modified
u8value - Value to set memory too
u32num - Number of bytes to set

Definition at line 26 of file memutil.c.