Update to allocator

This commit is contained in:
Maix0 2024-05-23 15:18:28 +02:00
parent b96c5e1e66
commit c461fe3323
10 changed files with 469 additions and 14 deletions

28
stdme/test/redef_alloc.h Normal file
View file

@ -0,0 +1,28 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* redef_alloc.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/22 15:15:52 by maiboyer #+# #+# */
/* Updated: 2024/05/22 15:16:34 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef REDEF_ALLOC_H
#define REDEF_ALLOC_H
#include "me/mem/mem.h"
#undef malloc
#undef calloc
#undef realloc
#undef free
#define malloc(s) mem_alloc((s))
#define calloc(s, l) mem_alloc_array((s), (l))
#define realloc(p, t) mem_realloc((p), (t))
#define free(p) mem_free((p))
#endif /* REDEF_ALLOC_H */