Rework memory management, use per-thread arenas

This commit is contained in:
kamkow1
2025-06-28 01:29:49 +02:00
parent 2badc915d6
commit 2988a5b3d6
9 changed files with 202 additions and 195 deletions

View File

@ -3,7 +3,7 @@
#include <pthread.h>
#define locked_init(x) { .value = (x), .lock = PTHREAD_MUTEX_INITIALIZER }
#define locked_init(x) { .value = x, .lock = PTHREAD_MUTEX_INITIALIZER }
#define locked(T) struct { T value; pthread_mutex_t lock; }
#define lockx(x) pthread_mutex_lock(&(x)->lock)