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

Method AllocateAligned

cpp/src/arrow/memory_pool.cc:220–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218class DebugAllocator {
219 public:
220 static Status AllocateAligned(int64_t size, int64_t alignment, uint8_t** out) {
221 if (size == 0) {
222 *out = memory_pool::internal::kZeroSizeArea;
223 } else {
224 ARROW_ASSIGN_OR_RAISE(int64_t raw_size, RawSize(size));
225 DCHECK(raw_size > size) << "bug in raw size computation: " << raw_size
226 << " for size " << size;
227 RETURN_NOT_OK(WrappedAllocator::AllocateAligned(raw_size, alignment, out));
228 InitAllocatedArea(*out, size);
229 }
230 return Status::OK();
231 }
232
233 static void ReleaseUnused() { WrappedAllocator::ReleaseUnused(); }
234

Callers

nothing calls this directly

Calls 1

OKFunction · 0.70

Tested by

no test coverage detected