mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Temp allocator now supports more than 2 in-flight stacks.
- Printing stacktrace uses its own temp allocator. - `@pool` no longer takes an argument. - `Allocator` interface removes `mark` and `reset`. - DynamicArenaAllocator has changed init function. - Added `BackedArenaAllocator` which is allocated to a fixed size, then allocates on the backing allocator and supports mark/reset.
This commit is contained in:
@@ -23,7 +23,7 @@ fn Object*? parse(Allocator allocator, InStream s)
|
||||
@stack_mem(512; Allocator smem)
|
||||
{
|
||||
JsonContext context = { .last_string = dstring::new_with_capacity(smem, 64), .stream = s, .allocator = allocator };
|
||||
@pool(allocator)
|
||||
@pool()
|
||||
{
|
||||
return parse_any(&context);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user