norminette pass
This commit is contained in:
parent
d59364c35e
commit
fc969750e4
19 changed files with 323 additions and 560 deletions
|
|
@ -11,32 +11,34 @@
|
|||
/* ************************************************************************** */
|
||||
|
||||
#ifndef ALLOCATOR_H
|
||||
#define ALLOCATOR_H
|
||||
# define ALLOCATOR_H
|
||||
|
||||
#include "me/types.h"
|
||||
# include "me/types.h"
|
||||
|
||||
typedef struct s_allocator t_allocator;
|
||||
typedef struct s_allocator t_allocator;
|
||||
|
||||
typedef void *(*t_allocator_alloc)(t_allocator *self, t_usize size);
|
||||
typedef void *(*t_allocator_alloc_array)(t_allocator *self, t_usize size,
|
||||
t_usize count);
|
||||
typedef void *(*t_allocator_realloc)(t_allocator *self, void *ptr,
|
||||
t_usize requested_size);
|
||||
typedef void *(*t_allocator_realloc_array)(t_allocator *self, void *ptr,
|
||||
t_usize requested_size,
|
||||
t_usize requested_count);
|
||||
typedef void (*t_allocator_free)(t_allocator *self, void *ptr);
|
||||
typedef void (*t_allocator_uninit)(t_allocator *self);
|
||||
typedef void *(*t_allocator_alloc)(t_allocator *self,
|
||||
t_usize size);
|
||||
typedef void *(*t_allocator_alloc_array)(t_allocator *self,
|
||||
t_usize size, t_usize count);
|
||||
typedef void *(*t_allocator_realloc)(t_allocator *self,
|
||||
void *ptr, t_usize requested_size);
|
||||
typedef void *(*t_allocator_realloc_array)(t_allocator *self,
|
||||
void *ptr, t_usize requested_size,
|
||||
t_usize requested_count);
|
||||
typedef void (*t_allocator_free)(t_allocator *self,
|
||||
void *ptr);
|
||||
typedef void (*t_allocator_uninit)(t_allocator *self);
|
||||
|
||||
struct s_allocator
|
||||
struct s_allocator
|
||||
{
|
||||
t_allocator_alloc alloc;
|
||||
t_allocator_alloc_array alloc_array;
|
||||
t_allocator_realloc realloc;
|
||||
t_allocator_realloc_array realloc_array;
|
||||
t_allocator_free free;
|
||||
t_allocator_uninit uninit;
|
||||
void *alloc_data;
|
||||
t_allocator_alloc alloc;
|
||||
t_allocator_alloc_array alloc_array;
|
||||
t_allocator_realloc realloc;
|
||||
t_allocator_realloc_array realloc_array;
|
||||
t_allocator_free free;
|
||||
t_allocator_uninit uninit;
|
||||
void *alloc_data;
|
||||
};
|
||||
|
||||
#endif /* ALLOCATOR_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue