yiguolei commented on code in PR #17820: URL: https://github.com/apache/doris/pull/17820#discussion_r1147316519
########## be/src/vec/common/arena.h: ########## @@ -271,9 +276,17 @@ class Arena : private boost::noncopyable { return res; } + void clear() { + delete head; + head = new Chunk(initial_size, nullptr), size_in_bytes = head->size(), + size_in_allocated = 0; + } + /// Size of chunks in bytes. size_t size() const { return size_in_bytes; } + size_t allocated_size() const { return size_in_allocated + head->remaining(); } Review Comment: rename this method to: used_size() because allocated size maybe allocated but not 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: 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