yiguolei commented on a change in pull request #8322: URL: https://github.com/apache/incubator-doris/pull/8322#discussion_r818636431
########## File path: be/src/exec/hash_table.cpp ########## @@ -244,7 +244,7 @@ void HashTable::grow_node_array() { _alloc_list.push_back(_current_nodes); _end_list.push_back(_current_nodes + alloc_size); - _mem_tracker->Consume(alloc_size); + _mem_tracker->consume(alloc_size); Review comment: There are many codes call mem_tracker->somsume(size_t), Is there a better method to do this automatically? For example, we may rewrite the memory allocators and track the memory usage during allocate, like in clickhouse: /// Implementation of std::allocator interface that tracks memory with MemoryTracker. /// NOTE We already plug MemoryTracker into new/delete operators. So, everything works even with default allocator. /// But it is enabled only if jemalloc is used (to obtain the size of the allocation on call to delete). /// And jemalloc is disabled for builds with sanitizers. In these cases memory was not always tracked. template <typename T> struct AllocatorWithMemoryTracking -- 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