Skip to content

Commit

Permalink
[mruby] Fix alignment of custom allocator for word boxing
Browse files Browse the repository at this point in the history
  • Loading branch information
hadashiA committed Oct 21, 2024
1 parent d54d5f3 commit a3b24b8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static void Free(void* ptr)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
static void* Malloc(uint size)
{
var allocated = UnsafeUtility.Malloc(size + HeaderSize, sizeof(byte), DefaultAllocator);
var allocated = UnsafeUtility.Malloc(size + HeaderSize, 4, DefaultAllocator);
WriteHeader(allocated, size);
return (byte*)allocated + HeaderSize;
}
Expand Down

0 comments on commit a3b24b8

Please sign in to comment.