add more parses and fix minor memory leak

This commit is contained in:
2025-05-31 20:03:06 +01:00
parent d18ff96f8f
commit a614eab8fc
16 changed files with 188 additions and 50 deletions

View File

@@ -3,26 +3,10 @@
#include <string.h>
#include <stdlib.h> // for malloc/free (temp arena fallback)
static char* temp_arena = NULL;
static size_t temp_arena_capacity = 0;
static size_t temp_arena_offset = 0;
#define TEMP_ARENA_INITIAL_CAPACITY 4096
void ar_memory_init() {
GC_INIT();
}
void ar_memory_shutdown() {
// No-op for Boehm, but could clean up temp arena here
if (temp_arena) {
free(temp_arena);
temp_arena = NULL;
temp_arena_capacity = 0;
temp_arena_offset = 0;
}
}
void* ar_alloc(size_t size) {
return GC_MALLOC(size);
}