All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Detailed Description

Standard memory functions.

Function Documentation

void free ( void *  ptr)

Frees previously allocated memory.

Parameters
ptrThe memory buffer to free.
void * malloc ( size_t  size)

Allocates a requested amount of memory.

Parameters
sizeThe number of bytes to allocate
Returns
A pointer to the allocated memory or NULL on error.
void * memcpy ( void *  dest,
const void *  src,
size_t  n 
)

Copies n bytes from src to dest.

Parameters
destThe pointer to the destination memory region
srcThe pointer to the source memory region
nThe number of bytes to copy
void * memmove ( void *  dest,
const void *  src,
size_t  n 
)

Copies n bytes from src to dest by first copying to a temporary area first, allowing dest and src to potentially overlap.

This can be used to move data to a location that overlaps its previous location.

Parameters
destThe pointer to the destination memory region
srcThe pointer to the source memory region
nThe number of bytes to copy
void * memset ( void *  dest,
int  c,
size_t  n 
)

Sets n bytes to c starting at dest.

This can be used to clear a memory region for example if c is 0.

Parameters
destThe pointer to the destination memory region
cThe integer used as an unsigned char to assign to each byte
nThe number of bytes to set

Typedef Documentation

size as an unsigned integer