yiguolei commented on code in PR #9581:
URL: https://github.com/apache/doris/pull/9581#discussion_r908099141


##########
be/src/runtime/memory/chunk_allocator.h:
##########
@@ -74,10 +74,19 @@ class ChunkAllocator {
     // Free chunk allocated from this allocator
     void free(const Chunk& chunk, MemTracker* tracker = nullptr);
 
+    // Transfer the memory ownership to the chunk allocator.
+    // If the chunk allocator is full, then free to the system.
+    // Note: make sure that the length of 'data' is equal to size,
+    // otherwise the capacity of chunk allocator will be wrong.
+    void free_as_chunk(uint8_t* data, size_t size, MemTracker* tracker = 
nullptr);

Review Comment:
   rename it to free(uint8_t* data, size_t size, MemTracker* tracker = nullptr)



-- 
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