marin-ma commented on code in PR #9869:
URL: https://github.com/apache/incubator-gluten/pull/9869#discussion_r2128808427
##########
cpp/velox/memory/VeloxMemoryManager.h:
##########
@@ -100,20 +103,24 @@ class VeloxMemoryManager final : public MemoryManager {
private:
bool tryDestructSafe();
+ void dropMemoryPool(const std::string& name);
+
#ifdef GLUTEN_ENABLE_HBM
std::unique_ptr<VeloxMemoryAllocator> wrappedAlloc_;
#endif
- // This is a listenable allocator used for arrow.
- std::unique_ptr<MemoryAllocator> listenableAlloc_;
std::unique_ptr<AllocationListener> listener_;
std::unique_ptr<AllocationListener> blockListener_;
- std::unique_ptr<arrow::MemoryPool> arrowPool_;
+
+ std::shared_ptr<ArrowMemoryPool> defaultArrowPool_;
+ std::unordered_map<std::string, std::weak_ptr<ArrowMemoryPool>> arrowPools_;
Review Comment:
Not sure. But for long running spark process, a new pool will be created for
every shuffle writer, which might be a large number. If we don't use weak
pointer here, we still need to delete the pool if it won't be used.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]