Normed most of the stdme
This commit is contained in:
parent
882d5cb5bb
commit
ac5458d42c
31 changed files with 149 additions and 617 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/14 18:26:27 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/07/07 19:10:07 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/07/10 17:48:46 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -17,23 +17,23 @@
|
|||
#include "me/types.h"
|
||||
#include <stdio.h>
|
||||
|
||||
t_allocator *global_allocator(void)
|
||||
t_allocator *global_allocator(void)
|
||||
{
|
||||
static t_allocator global_alloc = {};
|
||||
static bool init = false;
|
||||
static t_allocator global_alloc = {};
|
||||
static bool init = false;
|
||||
|
||||
if (!init)
|
||||
{
|
||||
init = true;
|
||||
global_alloc = m_init();
|
||||
// global_alloc = lc_init();
|
||||
}
|
||||
return (&global_alloc);
|
||||
}
|
||||
|
||||
__attribute__((destructor(200)))
|
||||
void uninit_global_allocator(void)
|
||||
void uninit_global_allocator(void)
|
||||
{
|
||||
t_allocator *allocator;
|
||||
t_allocator *allocator;
|
||||
|
||||
allocator = global_allocator();
|
||||
vg_mem_defined(allocator, sizeof(*allocator));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue