aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/public/udf/arrow/memory_pool.h
blob: bad76f9450e1d636bb11f8d88b57f8f0e8893a8f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once
#include <yql/essentials/public/udf/udf_version.h>

#include <arrow/memory_pool.h>

namespace NYql {
namespace NUdf {

constexpr size_t ArrowMemoryAlignment = 64;
static_assert((ArrowMemoryAlignment & (ArrowMemoryAlignment - 1)) == 0, "ArrowMemoryAlignment should be power of 2");

#if UDF_ABI_COMPATIBILITY_VERSION_CURRENT >= UDF_ABI_COMPATIBILITY_VERSION(2, 37)
arrow::MemoryPool* GetYqlMemoryPool();
#else
inline arrow::MemoryPool* GetYqlMemoryPool() {
    return arrow::default_memory_pool();
}
#endif

}
}