memorybook functionnal, with add

This commit is contained in:
Hugo LAMY
2022-03-25 21:27:24 +01:00
parent 02b5d88ea5
commit f645da7885
9 changed files with 113 additions and 110 deletions

18
headers/memorybook.h Normal file
View File

@@ -0,0 +1,18 @@
#ifndef MEMORYBOOK_H
# define MEMORYBOOK_H
typedef void(*t_mb_func_exit)(void*);
typedef struct s_exit
{
t_mb_func_exit f;
void *param;
} t_exit;
void mb_init(void(*f)(void*), void *param);
void *mb_alloc(size_t size);
void mb_add(void *addr);
void mb_free(void *addr);
void mb_exit(char *str);
#endif