This commit is contained in:
gingerBill
2025-12-09 12:47:59 +00:00
3 changed files with 5 additions and 1 deletions

View File

@@ -235,6 +235,7 @@ arena_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
if start < old_end && old_end == block.used && new_end <= block.capacity {
// grow data in-place, adjusting next allocation
block.used = uint(new_end)
arena.total_used = uint(new_end)
data = block.base[start:new_end]
// sanitizer.address_unpoison(data)
return

View File

@@ -4278,6 +4278,9 @@ gb_internal i64 *type_set_offsets_of(Slice<Entity *> const &fields, bool is_pack
gb_internal bool type_set_offsets(Type *t) {
t = base_type(t);
if (t->kind == Type_Struct) {
if (t->Struct.are_offsets_being_processed.load()) {
return true;
}
MUTEX_GUARD(&t->Struct.offset_mutex);
if (!t->Struct.are_offsets_set) {
t->Struct.are_offsets_being_processed.store(true);

View File

@@ -66,7 +66,7 @@ MessageBoxData :: struct {
message: cstring, /**< UTF-8 message text */
numbuttons: c.int,
buttons: ^MessageBoxButtonData,
buttons: [^]MessageBoxButtonData,
colorScheme: ^MessageBoxColorScheme, /**< ::SDL_MessageBoxColorScheme, can be NULL to use system settings */
}