MCPcopy Create free account
hub / github.com/apache/arrow / MaybeAlignMetadata

Function MaybeAlignMetadata

cpp/src/arrow/ipc/message.cc:54–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52namespace {
53
54Status MaybeAlignMetadata(std::shared_ptr<Buffer>* metadata) {
55 if (reinterpret_cast<uintptr_t>((*metadata)->data()) % 8 != 0) {
56 // If the metadata memory is not aligned, we copy it here to avoid
57 // potential UBSAN issues from Flatbuffers
58 ARROW_ASSIGN_OR_RAISE(*metadata, (*metadata)->CopySlice(0, (*metadata)->size()));
59 }
60 return Status::OK();
61}
62
63Status CheckMetadataAndGetBodyLength(const Buffer& metadata, int64_t* body_length) {
64 const flatbuf::Message* fb_message = nullptr;

Callers 1

ConsumeMetadataMethod · 0.85

Calls 5

CopySliceMethod · 0.80
ARROW_ASSIGN_OR_RAISEFunction · 0.70
OKFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected