From edb210905dcbe666fa5222bceacd2e5bdb16bb89 Mon Sep 17 00:00:00 2001 From: Michael Dusan Date: Mon, 10 Feb 2020 21:08:08 -0500 Subject: stage1: memory/report overhaul - split util_base.hpp from util.hpp - new namespaces: `mem` and `heap` - new `mem::Allocator` interface - new `heap::CAllocator` impl with global `heap::c_allocator` - new `heap::ArenaAllocator` impl - new `mem::TypeInfo` extracts names without RTTI - name extraction is enabled w/ ZIG_ENABLE_MEM_PROFILE=1 - new `mem::List` takes explicit `Allocator&` parameter - new `mem::HashMap` takes explicit `Allocator&` parameter - add Codegen.pass1_arena and use for all `ZigValue` allocs - deinit Codegen.pass1_arena early in `zig_llvm_emit_output()` --- src/memory_profiling.hpp | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 src/memory_profiling.hpp (limited to 'src/memory_profiling.hpp') diff --git a/src/memory_profiling.hpp b/src/memory_profiling.hpp deleted file mode 100644 index 78e77a89f1..0000000000 --- a/src/memory_profiling.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2019 Andrew Kelley - * - * This file is part of zig, which is MIT licensed. - * See http://opensource.org/licenses/MIT - */ - -#ifndef ZIG_MEMORY_PROFILING_HPP -#define ZIG_MEMORY_PROFILING_HPP - -#include "config.h" - -#include -#include - -struct MemprofInternCount { - size_t x_undefined; - size_t x_void; - size_t x_null; - size_t x_unreachable; - size_t zero_byte; -}; -extern MemprofInternCount memprof_intern_count; - -void memprof_init(void); - -void memprof_alloc(const char *name, size_t item_count, size_t type_size); -void memprof_dealloc(const char *name, size_t item_count, size_t type_size); - -void memprof_dump_stats(FILE *file); -#endif -- cgit v1.2.3