Use local mutex for each AstFile.arena

This commit is contained in:
gingerBill
2021-08-26 23:10:15 +01:00
parent 2f34f1283a
commit da79124e5d
3 changed files with 20 additions and 8 deletions

View File

@@ -805,8 +805,7 @@ void init_tokenizer_with_data(Tokenizer *t, String const &fullpath, void *data,
TokenizerInitError init_tokenizer_from_fullpath(Tokenizer *t, String const &fullpath, TokenizerFlags flags = TokenizerFlag_None) {
TokenizerInitError err = TokenizerInit_None;
char *c_str = alloc_cstring(heap_allocator(), fullpath);
defer (gb_free(heap_allocator(), c_str));
char *c_str = alloc_cstring(temporary_allocator(), fullpath);
// TODO(bill): Memory map rather than copy contents
gbFileContents fc = gb_file_read_contents(heap_allocator(), true, c_str);