Use fetch_add rather than +=

This commit is contained in:
gingerBill
2022-12-18 23:24:34 +00:00
parent e27046098b
commit 2a8fa8612d
2 changed files with 3 additions and 3 deletions

View File

@@ -72,7 +72,7 @@ gb_internal Ast *alloc_ast_node(AstFile *f, AstKind kind) {
node->kind = kind;
node->file_id = f ? f->id : 0;
global_total_node_memory_allocated += size;
global_total_node_memory_allocated.fetch_add(size);
return node;
}