sajson
High-Performance JSON Parser
|
Allocation policy that attempts to fit the parsed AST into an existing memory buffer. More...
#include <sajson.h>
Public Member Functions | |
bounded_allocation (size_t *existing_buffer, size_t size_in_words) | |
Uses an existing buffer to hold the parsed AST, if it fits. More... | |
template<size_t N> | |
bounded_allocation (size_t(&existing_buffer)[N]) | |
Convenience wrapper for bounded_allocation(size_t*, size) that automatically infers the size of the given array. More... | |
Allocation policy that attempts to fit the parsed AST into an existing memory buffer.
This allocation policy is useful when using sajson in a zero-allocation context or when there are constraints on the amount
|
inline |
Uses an existing buffer to hold the parsed AST, if it fits.
The specified buffer must not be deallocated until after the document is parsed and the AST traversed.
|
inlineexplicit |
Convenience wrapper for bounded_allocation(size_t*, size) that automatically infers the size of the given array.