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

@ -1,34 +0,0 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* alloc_dumb_internal.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/12 15:03:59 by maiboyer #+# #+# */
/* Updated: 2024/05/12 16:42:39 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef ALLOC_DUMB_INTERNAL_H
#define ALLOC_DUMB_INTERNAL_H
#include "me/types.h"
#define PTR_LENS 255
typedef struct s_ptr
{
void *ptr;
t_usize size;
} t_ptr;
typedef struct s_ptr_table
{
t_ptr table[PTR_LENS];
struct s_ptr_table *next;
} t_ptr_table;
t_ptr_table *get_table(void);
#endif /* ALLOC_DUMB_INTERNAL_H */