diff --git a/alloc.h b/alloc.h index 3245f55c3496bc75c70c04625ca3dcb7dd5d0afd..f417000e963943bdc526b85344ced3aaccbdc525 100644 --- a/alloc.h +++ b/alloc.h @@ -1,8 +1,33 @@ #ifndef _ALLOC_H_ #define _ALLOC_H_ - +#include <unistd.h> +#include <stdio.h> typedef struct meta_struct { - +struct meta_struct * prev; +struct meta_struct * next; +unsigned int free; +unsigned int size; } meta; +typedef struct meta_manage { +meta * Head; +meta * Tail; +} manage; + +manage META; + +void * m_malloc(size_t size); + +void * m_realloc(void *ptr , size_t size); + +void * m_free (void * ptr); + +void set_link(void); + +meta * search_and_split(size_t size); + +void print_link(void); + +void reverse_print(void); + #endif