zhztheplayer commented on code in PR #9869:
URL: https://github.com/apache/incubator-gluten/pull/9869#discussion_r2128750144
##########
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:
It's understandable to use weak pointers, but I am curious how many instance
will be added to this map in the worst case?
--
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]