Added build option to enable the leak counting allocator.

Log the allocation count to the client at the end of the main loop.
Fixed two memory leaks in analysis.zig
This commit is contained in:
Alexandros Naskos
2020-05-07 12:50:25 +03:00
parent 5bd790f416
commit 0283222e3a
3 changed files with 29 additions and 6 deletions

View File

@@ -16,6 +16,12 @@ pub fn build(b: *std.build.Builder) void {
exe.addPackagePath("data", "src/data/0.6.0.zig");
exe.addBuildOption(
bool,
"leak_detection",
b.option(bool, "leak_detection", "Use testing.LeakCountAllocator to track leaks.") orelse false,
);
exe.setTarget(target);
exe.setBuildMode(mode);
exe.install();