From a9bd73ef6a3b4336013e9424a4c5d4057cf94236 Mon Sep 17 00:00:00 2001 From: Kearwood Gilbert Date: Mon, 28 Sep 2026 00:10:18 -0700 Subject: [PATCH] Arena Allocator - Fix 32-bit limitation --- src/arena.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/arena.cpp b/src/arena.cpp index 2edfe6d..88df59d 100644 --- a/src/arena.cpp +++ b/src/arena.cpp @@ -96,8 +96,8 @@ std::byte* Arena::alloc(size_t size) std::byte* Arena::allocA16(size_t size) { - uint32_t nextByte = (m_usedSize + 15) & ~15; - uint32_t roundedSize = (size + 15) & ~15; + size_t nextByte = (m_usedSize + 15) & ~15; + size_t roundedSize = (size + 15) & ~15; if (alloc(roundedSize + nextByte - m_usedSize) == nullptr) { return nullptr; } @@ -107,8 +107,8 @@ std::byte* Arena::allocA16(size_t size) std::byte* Arena::allocA64(size_t size) { - uint32_t nextByte = (m_usedSize + 63) & ~63; - uint32_t roundedSize = (size + 63) & ~63; + size_t nextByte = (m_usedSize + 63) & ~63; + size_t roundedSize = (size + 63) & ~63; if (alloc(roundedSize + nextByte - m_usedSize) == nullptr) { return nullptr; }