diff --git a/cpp/velox/memory/VeloxMemoryManager.cc b/cpp/velox/memory/VeloxMemoryManager.cc index b7bd3a9f9a58..496ebf4522e1 100644 --- a/cpp/velox/memory/VeloxMemoryManager.cc +++ b/cpp/velox/memory/VeloxMemoryManager.cc @@ -44,7 +44,7 @@ class ListenableArbitrator : public velox::memory::MemoryArbitrator { uint64_t growCapacity(velox::memory::MemoryPool* pool, uint64_t targetBytes) override { std::lock_guard l(mutex_); listener_->allocationChanged(targetBytes); - if (!pool->grow(targetBytes, 0)) { + if (!growPool(pool, targetBytes, 0)) { VELOX_FAIL("Failed to grow root pool's capacity for {}", velox::succinctBytes(targetBytes)); } return targetBytes; @@ -81,7 +81,7 @@ class ListenableArbitrator : public velox::memory::MemoryArbitrator { auto pool = pools.at(0); const uint64_t oldCapacity = pool->capacity(); pool->reclaim(targetBytes, 0, status); // ignore the output - pool->shrink(0); + shrinkPool(pool.get(), 0); const uint64_t newCapacity = pool->capacity(); uint64_t total = oldCapacity - newCapacity; listener_->allocationChanged(-total); @@ -104,14 +104,14 @@ class ListenableArbitrator : public velox::memory::MemoryArbitrator { // We should pass bytes as parameter "reservationBytes" when calling ::grow. auto freeByes = pool->freeBytes(); if (freeByes > bytes) { - if (pool->grow(0, bytes)) { + if (growPool(pool, 0, bytes)) { return; } } - auto reclaimedFreeBytes = pool->shrink(0); + auto reclaimedFreeBytes = shrinkPool(pool, 0); auto neededBytes = velox::bits::roundUp(bytes - reclaimedFreeBytes, memoryPoolTransferCapacity_); listener_->allocationChanged(neededBytes); - auto ret = pool->grow(reclaimedFreeBytes + neededBytes, bytes); + auto ret = growPool(pool, reclaimedFreeBytes + neededBytes, bytes); VELOX_CHECK( ret, "{} failed to grow {} bytes, current state {}", @@ -121,7 +121,7 @@ class ListenableArbitrator : public velox::memory::MemoryArbitrator { } uint64_t shrinkCapacityLocked(velox::memory::MemoryPool* pool, uint64_t bytes) { - uint64_t freeBytes = pool->shrink(bytes); + uint64_t freeBytes = shrinkPool(pool, bytes); listener_->allocationChanged(-freeBytes); return freeBytes; } diff --git a/ep/build-velox/src/get_velox.sh b/ep/build-velox/src/get_velox.sh index 9fe130c1f69a..ff31daddb7b4 100755 --- a/ep/build-velox/src/get_velox.sh +++ b/ep/build-velox/src/get_velox.sh @@ -17,7 +17,7 @@ set -exu VELOX_REPO=https://github.com/oap-project/velox.git -VELOX_BRANCH=2024_05_29 +VELOX_BRANCH=2024_05_30 VELOX_HOME="" #Set on run gluten on HDFS