commit 5f3773b7150cbf113b5a0aabfe2b2670dc758d38 increased alignment for ChunckedBlocks, but not for BigAllocationBlocks. This is required to make SSE instructions work.
@@ -528,7 +528,7 @@ size_t malloc_size(void const* ptr)
auto* header = (const CommonHeader*)page_base;
auto size = header->m_size;
if (header->m_magic == MAGIC_BIGALLOC_HEADER)
- size -= sizeof(CommonHeader);
+ size -= sizeof(BigAllocationBlock);
else
VERIFY(header->m_magic == MAGIC_PAGE_HEADER);
return size;
@@ -46,7 +46,7 @@ struct BigAllocationBlock : public CommonHeader {
m_magic = MAGIC_BIGALLOC_HEADER;
m_size = size;
}
- unsigned char* m_slot[0];
+ alignas(16) unsigned char* m_slot[0];
};
struct FreelistEntry {