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:
parent
713f0f0302
commit
cb7f3c3fdf
85 changed files with 1121 additions and 877 deletions
26
allocator/include/aq/melloc.h
Normal file
26
allocator/include/aq/melloc.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* melloc.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/14 17:54:03 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/05/14 18:08:16 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef MELLOC_H
|
||||
#define MELLOC_H
|
||||
|
||||
#include "aq/allocator.h"
|
||||
|
||||
void *m_malloc(t_allocator *self, t_usize size);
|
||||
void *m_alloc_array(t_allocator *self, t_usize size, t_usize count);
|
||||
void *m_realloc(t_allocator *self, void *ptr, t_usize min_size);
|
||||
void *m_realloc_array(t_allocator *self, void *ptr, t_usize size,
|
||||
t_usize count);
|
||||
void m_free(t_allocator *self, void *ptr);
|
||||
void m_uninit(t_allocator *self);
|
||||
|
||||
#endif /* MELLOC_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue