From 7686aae2667fffd798ee2f0dc7ca1252a36612c5 Mon Sep 17 00:00:00 2001 From: quou Date: Fri, 7 Feb 2025 00:27:11 +1100 Subject: arena pop --- qstd/memory.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qstd/memory.h') diff --git a/qstd/memory.h b/qstd/memory.h index a0b819a..d87dce6 100644 --- a/qstd/memory.h +++ b/qstd/memory.h @@ -13,6 +13,7 @@ void zero(void* buf, int size); typedef struct Arena { char* buf; int size, ptr; + int last_push; } Arena; void init_arena( @@ -30,6 +31,8 @@ void* arena_alloc_aligned( int size, int align ); +void arena_push(Arena* a); +void arena_pop(Arena* a); typedef struct Heap { char* buf; -- cgit v1.2.3-54-g00ecf