diff options
| author | gingerBill <bill@gingerbill.org> | 2022-02-18 21:30:25 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-02-18 21:30:25 +0000 |
| commit | 71df46456a4db2592e8cebbdd4c46dc8b58b5a24 (patch) | |
| tree | 4152775ac24721cd026025d1e478d2eb9a254b41 /src/checker.cpp | |
| parent | cd89d8a3c414a6929ec058a04aeec568d99505a5 (diff) | |
Minimize memory usage by having an arena per thread rather than an arena per file
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index f8aa8d45b..f440b7c9a 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -225,8 +225,8 @@ bool decl_info_has_init(DeclInfo *d) { Scope *create_scope(CheckerInfo *info, Scope *parent, isize init_elements_capacity=DEFAULT_SCOPE_CAPACITY) { Scope *s = gb_alloc_item(permanent_allocator(), Scope); s->parent = parent; - string_map_init(&s->elements, permanent_allocator(), init_elements_capacity); - ptr_set_init(&s->imported, permanent_allocator(), 0); + string_map_init(&s->elements, heap_allocator(), init_elements_capacity); + ptr_set_init(&s->imported, heap_allocator(), 0); mutex_init(&s->mutex); if (parent != nullptr && parent != builtin_pkg->scope) { |