mkleen commented on code in PR #23349:
URL: https://github.com/apache/datafusion/pull/23349#discussion_r3534303377


##########
datafusion/common/src/heap_size.rs:
##########
@@ -281,11 +281,23 @@ impl<K: DFHeapSize, V: DFHeapSize> DFHeapSize for 
HashMap<K, V> {
     }
 }
 
+fn count_allocation_once(ptr: usize, ctx: &mut DFHeapSizeCtx) -> bool {

Review Comment:
   We could add this function directly to the `DFHeapSizeCtx`:
   
   ```rust
   impl DFHeapSizeCtx {
       fn count_allocation_once(&mut self, ptr: usize) -> bool {
           self.seen.insert(ptr)
       }
   }
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to