From 9eefbb4afc9601024eac6191addd98e21f90a5b3 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sun, 18 Dec 2022 16:53:46 +0100 Subject: multithread outgoing network messages, thread safe allocator, refactor --- include/allocator.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/allocator.h') diff --git a/include/allocator.h b/include/allocator.h index d1fe9f4..a1c8bf0 100644 --- a/include/allocator.h +++ b/include/allocator.h @@ -7,10 +7,12 @@ typedef struct t_allocator { void* memory; uint64_t cursor; uint64_t size; + mutex mutex; } allocator; allocator create_allocator(uint64_t size); void* allocator_alloc(allocator* al, uint64_t size); void destroy_allocator(allocator* al); +void allocator_clear(allocator* al); #endif \ No newline at end of file -- cgit v1.2.3-70-g09d2