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

Method AllocateAligned

cpp/src/arrow/memory_pool.cc:393–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391class MimallocAllocator {
392 public:
393 static Status AllocateAligned(int64_t size, int64_t alignment, uint8_t** out) {
394 if (size == 0) {
395 *out = memory_pool::internal::kZeroSizeArea;
396 return Status::OK();
397 }
398 *out = reinterpret_cast<uint8_t*>(arrow_mi_malloc_aligned(
399 static_cast<size_t>(size), static_cast<size_t>(alignment)));
400 if (*out == NULL) {
401 return Status::OutOfMemory("malloc of size ", size, " failed");
402 }
403 return Status::OK();
404 }
405
406 static void ReleaseUnused() { arrow_mi_collect(true); }
407

Callers

nothing calls this directly

Calls 3

arrow_mi_malloc_alignedFunction · 0.85
OutOfMemoryFunction · 0.85
OKFunction · 0.70

Tested by

no test coverage detected