Skip to content

Commit

Permalink
Fix the compile issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JkSelf committed Sep 26, 2024
1 parent 7078ad6 commit 54a6b2a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions cpp/velox/memory/VeloxMemoryManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ VeloxMemoryManager::VeloxMemoryManager(std::unique_ptr<AllocationListener> liste
listenableAlloc_ = std::make_unique<ListenableMemoryAllocator>(defaultMemoryAllocator().get(), blockListener_.get());
arrowPool_ = std::make_unique<ArrowMemoryPool>(listenableAlloc_.get());

std::unordered_map<std::string, std::string> extraArbitratorConfigs;
extraArbitratorConfigs["memory-pool-initial-capacity"] =
folly::to<std::string>(memInitCapacity) + "B";
extraArbitratorConfigs["memory-pool-transfer-capacity"] =
folly::to<std::string>(reservationBlockSize) + "B";
extraArbitratorConfigs["memory-reclaim-max-wait-time"] =
folly::to<std::string>(0) + "ms";

ArbitratorFactoryRegister afr(listener_.get());
velox::memory::MemoryManagerOptions mmOptions{
.alignment = velox::memory::MemoryAllocator::kMaxAlignment,
Expand All @@ -219,9 +227,7 @@ VeloxMemoryManager::VeloxMemoryManager(std::unique_ptr<AllocationListener> liste
.coreOnAllocationFailureEnabled = false,
.allocatorCapacity = velox::memory::kMaxMemory,
.arbitratorKind = afr.getKind(),
.memoryPoolInitCapacity = memInitCapacity,
.memoryPoolTransferCapacity = reservationBlockSize,
.memoryReclaimWaitMs = 0};
.extraArbitratorConfigs = extraArbitratorConfigs};
veloxMemoryManager_ = std::make_unique<velox::memory::MemoryManager>(mmOptions);

veloxAggregatePool_ = veloxMemoryManager_->addRootPool(
Expand Down

0 comments on commit 54a6b2a

Please sign in to comment.