diff options
| author | Michael Dusan <michael.dusan@gmail.com> | 2020-02-10 23:08:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-10 23:08:33 -0500 |
| commit | e624c862894ec50998aafb3026d4ed45208acd6d (patch) | |
| tree | a01d54c8d5ba3178eaed1fa8d0ef9c081d95d9f2 /src/userland.cpp | |
| parent | 26183660558c43133d862912c602e316f43698c7 (diff) | |
| parent | edb210905dcbe666fa5222bceacd2e5bdb16bb89 (diff) | |
| download | zig-e624c862894ec50998aafb3026d4ed45208acd6d.tar.gz zig-e624c862894ec50998aafb3026d4ed45208acd6d.zip | |
Merge pull request #4389 from mikdusan/stage1-mem
stage1: memory/report overhaul
Diffstat (limited to 'src/userland.cpp')
| -rw-r--r-- | src/userland.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/userland.cpp b/src/userland.cpp index 8524be5739..ba0e906cf9 100644 --- a/src/userland.cpp +++ b/src/userland.cpp @@ -101,7 +101,7 @@ Error stage2_cpu_features_parse(struct Stage2CpuFeatures **out, const char *zig_ const char *cpu_name, const char *cpu_features) { if (zig_triple == nullptr) { - Stage2CpuFeatures *result = allocate<Stage2CpuFeatures>(1, "Stage2CpuFeatures"); + Stage2CpuFeatures *result = heap::c_allocator.create<Stage2CpuFeatures>(); result->llvm_cpu_name = ZigLLVMGetHostCPUName(); result->llvm_cpu_features = ZigLLVMGetNativeFeatures(); result->builtin_str = "arch.getBaselineCpuFeatures();\n"; @@ -110,7 +110,7 @@ Error stage2_cpu_features_parse(struct Stage2CpuFeatures **out, const char *zig_ return ErrorNone; } if (cpu_name == nullptr && cpu_features == nullptr) { - Stage2CpuFeatures *result = allocate<Stage2CpuFeatures>(1, "Stage2CpuFeatures"); + Stage2CpuFeatures *result = heap::c_allocator.create<Stage2CpuFeatures>(); result->builtin_str = "arch.getBaselineCpuFeatures();\n"; result->cache_hash = "\n\n"; *out = result; |
