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.
13 lines
179 B
C
13 lines
179 B
C
|
|
#ifndef _PARSE_H
|
|
#define _PARSE_H
|
|
|
|
#include "json_value.h"
|
|
|
|
#include "arena.h"
|
|
#include <stdio.h> // FILE*
|
|
|
|
struct json_value parse_json_value(FILE* fp, arena_t* arena);
|
|
|
|
#endif
|