xinyiZzz commented on code in PR #50549:
URL: https://github.com/apache/doris/pull/50549#discussion_r2077142552


##########
be/src/vec/common/pod_array.h:
##########
@@ -143,6 +146,32 @@ class PODArrayBase : private boost::noncopyable,
         return byte_size(num_elements) + pad_right + pad_left;
     }
 
+    // `tracking_and_check_memory` is called after alloc memory.
+    inline void tracking_and_check_memory(int64_t size) {
+        CONSUME_THREAD_MEM_TRACKER(size);

Review Comment:
   这里 tracking 的时候,内存实际已经分配完了,可以看注视
           // `tracking_and_check_memory` is called after alloc memory.
           // After `CONSUME_THREAD_MEM_TRACKER`, it is considered that `size` 
has been updated
           // to the process memory and mem tracker.
           // check whether BUFFER_SIZE can be allocated again.



##########
be/src/vec/common/pod_array.h:
##########
@@ -143,6 +146,32 @@ class PODArrayBase : private boost::noncopyable,
         return byte_size(num_elements) + pad_right + pad_left;
     }
 
+    // `tracking_and_check_memory` is called after alloc memory.
+    inline void tracking_and_check_memory(int64_t size) {
+        CONSUME_THREAD_MEM_TRACKER(size);

Review Comment:
   这里 tracking 的时候,内存实际已经分配完了,可以看注释
           // `tracking_and_check_memory` is called after alloc memory.
           // After `CONSUME_THREAD_MEM_TRACKER`, it is considered that `size` 
has been updated
           // to the process memory and mem tracker.
           // check whether BUFFER_SIZE can be allocated again.



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