Create simple, bump allocator store

This commit is contained in:
2025-08-09 17:01:56 +01:00
parent 23bbbea755
commit f41d3a949c
5 changed files with 66 additions and 0 deletions

14
lib/store.c Normal file
View File

@@ -0,0 +1,14 @@
#include "store.h"
#include <string.h>
void store_init(store_t *store)
{
memset(store, 0, sizeof(store_t));
store->free = store->buffer;
}
expr_t *store_alloc(store_t *store)
{
return store->free++;
}