Create simple, bump allocator store
This commit is contained in:
1 parent
23bbbea755
commit
f41d3a949c
5 files changed
+66
No files matched your search
@@ -0,0 +1,16 @@
|
||||
#ifndef STORE_H
|
||||
#define STORE_H
|
||||
|
||||
#include "expr.h"
|
||||
|
||||
#define STORE_SIZE 256U
|
||||
|
||||
typedef struct {
|
||||
expr_t *free;
|
||||
expr_t buffer[STORE_SIZE];
|
||||
} store_t;
|
||||
|
||||
void store_init(store_t *store);
|
||||
expr_t *store_alloc(store_t *store);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user