diff --git a/rust/arrow/src/buffer.rs b/rust/arrow/src/buffer.rs index 6172445ec821e..70aea63aedcb2 100644 --- a/rust/arrow/src/buffer.rs +++ b/rust/arrow/src/buffer.rs @@ -132,7 +132,8 @@ impl> From for Buffer { // allocate aligned memory buffer let slice = p.as_ref(); let len = slice.len() * mem::size_of::(); - let buffer = memory::allocate_aligned(len).unwrap(); + let capacity = bit_util::round_upto_multiple_of_64(len); + let buffer = memory::allocate_aligned(capacity).unwrap(); unsafe { memory::memcpy(buffer, slice.as_ptr(), len); }