westonpace commented on code in PR #35565:
URL: https://github.com/apache/arrow/pull/35565#discussion_r1207038881
##########
cpp/src/arrow/util/align_util.cc:
##########
@@ -94,12 +135,17 @@ bool CheckAlignment(const Table& table, int64_t alignment,
return all_aligned;
}
+// Most allocators require a minimum of 8-byte alignment.
+constexpr int64_t kMinimumAlignment = 8;
+
Result<std::shared_ptr<Buffer>> EnsureAlignment(std::shared_ptr<Buffer> buffer,
int64_t alignment,
MemoryPool* memory_pool) {
Review Comment:
I've added a general check (and test) for zero/negative alignment and a
specific check for `kValueAlignment` mentioning that it is not an valid option
for buffers.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]