Replace many uses of heap_allocator() with permanent_allocator()

This commit is contained in:
gingerBill
2021-09-13 01:30:30 +01:00
parent 2d7aea79b9
commit 042dbda47f
8 changed files with 23 additions and 31 deletions

View File

@@ -832,7 +832,7 @@ ExactValue exact_binary_operator_value(TokenKind op, ExactValue x, ExactValue y)
String sx = x.value_string;
String sy = y.value_string;
isize len = sx.len+sy.len;
u8 *data = gb_alloc_array(heap_allocator(), u8, len);
u8 *data = gb_alloc_array(permanent_allocator(), u8, len);
gb_memmove(data, sx.text, sx.len);
gb_memmove(data+sx.len, sy.text, sy.len);
return exact_value_string(make_string(data, len));