mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
LibC: Increase alignment for malloc() BigAllocationBlocks to 16 bytes
commit 5f3773b715
increased alignment
for ChunckedBlocks, but not for BigAllocationBlocks.
This is required to make SSE instructions work.
This commit is contained in:
parent
36af2fdc4f
commit
feb19646df
Notes:
sideshowbarker
2024-07-17 18:04:09 +09:00
Author: https://github.com/rouseabout Commit: https://github.com/SerenityOS/serenity/commit/feb19646df Pull-request: https://github.com/SerenityOS/serenity/pull/12828 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/kleinesfilmroellchen
2 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue