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:
@@ -95,7 +95,7 @@ fn uptr? load_address() @local
|
||||
|
||||
fn Backtrace? backtrace_load_element(String execpath, void* buffer, void* load_address, Allocator allocator = allocator::heap()) @local
|
||||
{
|
||||
@pool(allocator)
|
||||
@pool()
|
||||
{
|
||||
if (buffer)
|
||||
{
|
||||
@@ -145,9 +145,9 @@ fn BacktraceList? symbolize_backtrace(Allocator allocator, void*[] backtrace)
|
||||
}
|
||||
list.free();
|
||||
}
|
||||
@pool(allocator)
|
||||
@pool()
|
||||
{
|
||||
String execpath = executable_path(allocator::temp())!;
|
||||
String execpath = executable_path(tmem())!;
|
||||
foreach (addr : backtrace)
|
||||
{
|
||||
list.push(backtrace_load_element(execpath, addr, load_addr, allocator) ?? backtrace::BACKTRACE_UNKNOWN);
|
||||
|
||||
Reference in New Issue
Block a user