diff options
author | Omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-03-17 15:00:53 +1100 |
---|---|---|
committer | Omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-03-17 15:00:53 +1100 |
commit | 51b4a3fc75351d6ecd2142c228d31a1f7ed52152 (patch) | |
tree | c28d0c11b71a56199a6308914a040e18a28b60ef /src/std/mem.h | |
parent | 2b83174a87f5a1e4991cc9153309ad0f73450b44 (diff) |
fix a bug with dirname seg faulting when passed a string literal
it doesnt like things in readonly memory i guess.
now we create an arena for the obj load and create a dynamically allocated copy of the string
Diffstat (limited to 'src/std/mem.h')
-rw-r--r-- | src/std/mem.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/std/mem.h b/src/std/mem.h index c3ec61d..2f92894 100644 --- a/src/std/mem.h +++ b/src/std/mem.h @@ -22,4 +22,5 @@ arena arena_create(void* backing_buffer, size_t capacity); void* arena_alloc(arena* a, size_t size); void* arena_alloc_align(arena* a, size_t size, size_t align); void arena_free_all(arena* a); +void arena_free_storage(arena* a); // TODO: arena_resize
\ No newline at end of file |