aboutsummaryrefslogtreecommitdiff
path: root/src/stage1/mem.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-09-30 02:55:41 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-09-30 02:55:41 -0700
commit7067764ed3f85eca17be7310b848ad97bd8af52e (patch)
treee61901ce753c541d3c3778c544bd98826691efb8 /src/stage1/mem.cpp
parente2d1f9874df2a9221aaa9ec55bd2974b70601f64 (diff)
parentfe117d9961c3622fda5c359733d01de686509af0 (diff)
downloadzig-7067764ed3f85eca17be7310b848ad97bd8af52e.tar.gz
zig-7067764ed3f85eca17be7310b848ad97bd8af52e.zip
Merge remote-tracking branch 'origin/master' into llvm11
The changes to install_files.h needed to put into src/libcxx.zig
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