diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2021-08-26 16:06:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-26 16:06:37 +0100 |
| commit | 6dfab34aca9a645f6f8c1ddd220f663aa90de529 (patch) | |
| tree | 0436f1ac647625bfc1067c6419e831599a8ef811 /src/parser.cpp | |
| parent | 98dd59e412314f089fc9558c5cf92a8a5df5213a (diff) | |
| parent | d3d805ffb3e859c1fa85865345c5adc557326c2d (diff) | |
Merge pull request #1101 from odin-lang/compiler-allocator-improvements
Compiler Allocator Improvements
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 880e92273..a98259454 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -4784,9 +4784,8 @@ ParseFileError init_ast_file(AstFile *f, String fullpath, TokenPos *err_pos) { isize const page_size = 4*1024; isize block_size = 2*f->tokens.count*gb_size_of(Ast); block_size = ((block_size + page_size-1)/page_size) * page_size; - block_size = gb_clamp(block_size, page_size, ARENA_DEFAULT_BLOCK_SIZE); - - arena_init(&f->arena, heap_allocator(), block_size); + block_size = gb_clamp(block_size, page_size, DEFAULT_MINIMUM_BLOCK_SIZE); + f->arena.minimum_block_size = block_size; array_init(&f->comments, heap_allocator(), 0, 0); |