Put the custom allocator in its own lib, as to lessen the difficulty to switch between libc's allocator and a custom one (#7)

This commit is contained in:
Maix0 2024-05-14 18:56:53 +02:00 committed by GitHub
parent 713f0f0302
commit cb7f3c3fdf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
85 changed files with 1121 additions and 877 deletions

View file

@ -101,8 +101,8 @@ int main(void) {
printf("\n");
printf("\n");
}
me_free(dest_libc);
me_free(dest_ft);
mem_free(dest_libc);
mem_free(dest_ft);
}
}
R*/

View file

@ -97,8 +97,8 @@ int main(void) {
printf("\n");
printf("\n");
}
me_free(dest_libc);
me_free(dest_ft);
mem_free(dest_libc);
mem_free(dest_ft);
}
}
R*/

View file

@ -6,12 +6,11 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/08/17 15:56:59 by maiboyer #+# #+# */
/* Updated: 2023/12/09 16:52:08 by maiboyer ### ########.fr */
/* Updated: 2024/05/14 18:44:18 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/mem/mem_alloc.h"
#include "me/mem/mem_alloc_array.h"
#include "me/mem/mem.h"
#include "me/string/str_l_copy.h"
#include "me/string/str_split.h"
#include <stdlib.h>
@ -43,7 +42,7 @@ static t_usize local_count_words(t_const_str str, char chr)
static t_str *local_split_freeall(t_str **to_free)
{
while (*to_free)
me_free(*(to_free++));
mem_free(*(to_free++));
return (NULL);
}