mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-17 11:05:05 +02:00
alignment: use proper alignment size
Pass proper alignment size when use allocate_align(). This will fix alignment trap issues on ARM. Signed-off-by: Beilu Shao <beilushao@gmail.com>
This commit is contained in:
@@ -300,7 +300,7 @@ inline std::size_t aligned_size(
|
||||
template <typename T<%1.upto(i) {|j|%>, typename A<%=j%><%}%>>
|
||||
T* zone::allocate(<%=(1..i).map{|j|"A#{j} a#{j}"}.join(', ')%>)
|
||||
{
|
||||
void* x = allocate_align(sizeof(T));
|
||||
void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T));
|
||||
try {
|
||||
m_finalizer_array.push(&zone::object_destruct<T>, x);
|
||||
} catch (...) {
|
||||
|
Reference in New Issue
Block a user