Memory Allocation

#include <malloc.h>

void *calloc(size_t num elems, size_t elem_size) - Allocate an array and initialise all elements to zero .

void free(void *mem address) - Free a block of memory.

void *malloc(size_t num bytes) - Allocate a block of memory.

void *realloc(void *mem address, size_t news i ze) - Reallocate (adjust size) a block of memory.

Memory Manipulation

#include <memory.h>

void *memchr (void *s, int c, size_t n) - Search for a character in a buffer.

int memcmp (void *s1, void *s2, size_t n) - Compare two buffers.

void *memcpy (void *dest, void *src, size_t n) - Copy one buffer into another .

void *memmove (void *dest, void *src, size_t n) - Move a number of bytes from one buffer lo another.

void *memset (void *s, int c, size_t n) - Set all bytes of a buffer to a given character.