Minimize memory usage by having an arena per thread rather than an arena per file

This commit is contained in:
gingerBill
2022-02-18 21:30:25 +00:00
parent cd89d8a3c4
commit 71df46456a
6 changed files with 15 additions and 15 deletions

View File

@@ -89,7 +89,9 @@ template <typename T>
void slice_init(Slice<T> *s, gbAllocator const &allocator, isize count) {
GB_ASSERT(count >= 0);
s->data = gb_alloc_array(allocator, T, count);
GB_ASSERT(s->data != nullptr);
if (count > 0) {
GB_ASSERT(s->data != nullptr);
}
s->count = count;
}