xinyiZzz commented on a change in pull request #8322:
URL: https://github.com/apache/incubator-doris/pull/8322#discussion_r824319466



##########
File path: be/src/runtime/mem_pool.cpp
##########
@@ -45,9 +63,8 @@ MemPool::~MemPool() {
     int64_t total_bytes_released = 0;
     for (auto& chunk : chunks_) {
         total_bytes_released += chunk.chunk.size;
-        ChunkAllocator::instance()->free(chunk.chunk);
+        ChunkAllocator::instance()->free(chunk.chunk, _mem_tracker);
     }
-    mem_tracker_->Release(total_bytes_released);

Review comment:
       The memory statistics in MemPool sink into ChunkAllocator,
   After the refactoring, the mem tracker is added to ChunkAllocator. In order 
to avoid affecting the readability of the code in two places, the statistics 
are unified in ChunkAllocator.




-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to