memory_pool.h 524 B

123456789101112131415161718192021
  1. #pragma once
  2. #include <yql/essentials/public/udf/udf_version.h>
  3. #include <arrow/memory_pool.h>
  4. namespace NYql {
  5. namespace NUdf {
  6. constexpr size_t ArrowMemoryAlignment = 64;
  7. static_assert((ArrowMemoryAlignment & (ArrowMemoryAlignment - 1)) == 0, "ArrowMemoryAlignment should be power of 2");
  8. #if UDF_ABI_COMPATIBILITY_VERSION_CURRENT >= UDF_ABI_COMPATIBILITY_VERSION(2, 37)
  9. arrow::MemoryPool* GetYqlMemoryPool();
  10. #else
  11. inline arrow::MemoryPool* GetYqlMemoryPool() {
  12. return arrow::default_memory_pool();
  13. }
  14. #endif
  15. }
  16. }