Corewar documentation 1.0.0
Loading...
Searching...
No Matches
my_realloc.c File Reference

The file containing the my_realloc function. More...

#include "mymemory.h"

Functions

void * my_realloc (void *pointer, size_t size, int type)
 Reallocates memory for an array of bytes (size)
 

Detailed Description

The file containing the my_realloc function.

Author
Nicolas TORO

Function Documentation

◆ my_realloc()

void * my_realloc ( void * pointer,
size_t size,
int type )

Reallocates memory for an array of bytes (size)

Note
type = 0: Free allocated memory with my_realloc
type = 1: Allocate memory
Parameters
pointerThe pointer to the memory to reallocate
sizeThe size of the memory to reallocate
typeThe type of the usage
Returns
void * A pointer to the reallocated memory
Author
Nicolas TORO