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:
committed by
Ole Kristian Morud
parent
f58c5dcfee
commit
b3821cf8bf
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user