aboutsummaryrefslogtreecommitdiff
path: root/src/memory_profiling.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-11-30 23:54:15 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-12-01 01:13:21 -0500
commit4b6740e19d57454f3c4eac0c2e9a92ce08e7ec04 (patch)
treef41867e2e9fcae52ab38590a3067b0396d23aff6 /src/memory_profiling.cpp
parent5026b1aad550bd85d12480e0a356302e858f8eef (diff)
downloadzig-4b6740e19d57454f3c4eac0c2e9a92ce08e7ec04.tar.gz
zig-4b6740e19d57454f3c4eac0c2e9a92ce08e7ec04.zip
sometimes free stuff from Zig IR pass 1
Total bytes used in stage1 std lib tests: 3.418 -> 3.198 GiB (saving 225 MiB) There's still this from pass 1 not getting freed: Const: 6909049 items, 72 bytes each, total 474.407 MiB This is due to 2 things hanging on to references to IrAnalyze pointers: * ZigVar->owner_exec->analysis * LazyValue->ira The LazyValue one could be solved by memoizing the results after the lazy value is resolved, and then it could unref the IrAnalyze. ZigVars that are determined to be comptime const, could have their const_value set to that value, instead of using the mem_slot_index mechanism. This would prevent an IrAnalyze ref in some cases.
Diffstat (limited to 'src/memory_profiling.cpp')
0 files changed, 0 insertions, 0 deletions