Made a memory allocator (crude)

This commit is contained in:
Maieul BOYER 2024-05-07 15:21:41 +02:00
parent b5c7344851
commit 941bac31b6
No known key found for this signature in database
53 changed files with 469 additions and 146 deletions

View file

@ -6,21 +6,14 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/12/06 14:47:49 by maiboyer #+# #+# */
/* Updated: 2023/12/09 18:14:11 by maiboyer ### ########.fr */
/* Updated: 2024/05/07 12:45:31 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/mem/mem_alloc.h"
#include <stdlib.h>
#include "me/alloc/alloc.h"
void *mem_alloc(t_usize size)
{
void *out;
size_t i;
i = 0;
out = malloc(size);
while (out && i < size)
((t_u8 *)out)[i++] = 0;
return (out);
return (me_malloc(size));
}