stage1: memory/report overhaul
- split util_base.hpp from util.hpp - new namespaces: `mem` and `heap` - new `mem::Allocator` interface - new `heap::CAllocator` impl with global `heap::c_allocator` - new `heap::ArenaAllocator` impl - new `mem::TypeInfo` extracts names without RTTI - name extraction is enabled w/ ZIG_ENABLE_MEM_PROFILE=1 - new `mem::List` takes explicit `Allocator&` parameter - new `mem::HashMap` takes explicit `Allocator&` parameter - add Codegen.pass1_arena and use for all `ZigValue` allocs - deinit Codegen.pass1_arena early in `zig_llvm_emit_output()`
This commit is contained in:
@@ -520,7 +520,7 @@ void get_native_target(ZigTarget *target) {
|
||||
target->abi = target_default_abi(target->arch, target->os);
|
||||
}
|
||||
if (target_is_glibc(target)) {
|
||||
target->glibc_version = allocate<ZigGLibCVersion>(1);
|
||||
target->glibc_version = heap::c_allocator.create<ZigGLibCVersion>();
|
||||
target_init_default_glibc_version(target);
|
||||
#ifdef ZIG_OS_LINUX
|
||||
Error err;
|
||||
|
||||
Reference in New Issue
Block a user