LibJS: Make sure all allocators are 8-byte aligned

Absolutely massive allocations > 1024 bytes would go into the size
class which was 3172 bytes. 3172 happens to not be 8 byte aligned, and
so made UBSAN very sad on x86_64. Change the largest allocator to be
3072 bytes, which is in fact a multiple of 8 :^)
This commit is contained in:
Andrew Kaster 2021-05-12 06:34:33 -06:00 committed by Linus Groh
parent e1b8a2e517
commit f90a19ba4c
Notes: sideshowbarker 2024-07-18 18:11:12 +09:00

View File

@ -30,7 +30,7 @@ Heap::Heap(VM& vm)
m_allocators.append(make<Allocator>(256));
m_allocators.append(make<Allocator>(512));
m_allocators.append(make<Allocator>(1024));
m_allocators.append(make<Allocator>(3172));
m_allocators.append(make<Allocator>(3072));
}
Heap::~Heap()