aboutsummaryrefslogtreecommitdiff
path: root/src/stage1/mem.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-09-30 04:28:19 -0400
committerGitHub <noreply@github.com>2020-09-30 04:28:19 -0400
commitfe117d9961c3622fda5c359733d01de686509af0 (patch)
treef4c3c9282049dff85dcc417f831414cb5ab7c524 /src/stage1/mem.cpp
parentbd449b184a0c9fb824184672b12f90ed2698b77a (diff)
parent3249e5d952cfcecca999391ffc02cce92ff8fcc4 (diff)
downloadzig-fe117d9961c3622fda5c359733d01de686509af0.tar.gz
zig-fe117d9961c3622fda5c359733d01de686509af0.zip
Merge pull request #6250 from ziglang/stage2-zig-cc
move `zig cc`, `zig translate-c`, `zig libc`, main(), and linking from stage1 to stage2
Diffstat (limited to 'src/stage1/mem.cpp')
-rw-r--r--src/stage1/mem.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/stage1/mem.cpp b/src/stage1/mem.cpp
new file mode 100644
index 0000000000..48dbd791de
--- /dev/null
+++ b/src/stage1/mem.cpp
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2020 Andrew Kelley
+ *
+ * This file is part of zig, which is MIT licensed.
+ * See http://opensource.org/licenses/MIT
+ */
+
+#include "config.h"
+#include "mem.hpp"
+#include "heap.hpp"
+
+namespace mem {
+
+void init() {
+ heap::bootstrap_allocator_state.init("heap::bootstrap_allocator");
+ heap::c_allocator_state.init("heap::c_allocator");
+}
+
+void deinit() {
+ heap::c_allocator_state.deinit();
+ heap::bootstrap_allocator_state.deinit();
+}
+
+} // namespace mem