Feature: Use arena-allocation for memory handling

Arena allocation make deallocation of nested structed MUCH faster, and
improves the spatial locality of allocations. It makes no sense to
deallocate only parts of a JSON structure so arenas are a good fit here.
This commit is contained in:
olemorud
2023-05-16 02:44:49 +02:00
committed by Ole Kristian Morud
parent f58c5dcfee
commit b3821cf8bf
11 changed files with 124 additions and 97 deletions

View File

@@ -4,8 +4,9 @@
#include "json_value.h"
#include "arena.h"
#include <stdio.h> // FILE*
struct json_value parse_json_value(FILE* fp);
struct json_value parse_json_value(FILE* fp, arena_t* arena);
#endif