From da79124e5d43c54a358fd18b64414ec2c1536476 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 26 Aug 2021 23:10:15 +0100 Subject: Use local mutex for each `AstFile.arena` --- src/tokenizer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/tokenizer.cpp') diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp index 556da7c4c..814e418aa 100644 --- a/src/tokenizer.cpp +++ b/src/tokenizer.cpp @@ -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); -- cgit v1.2.3