alamb commented on a change in pull request #505:
URL: https://github.com/apache/arrow-rs/pull/505#discussion_r660795836
##########
File path: arrow/src/array/data.rs
##########
@@ -354,12 +354,7 @@ impl ArrayData {
/// Returns the total number of bytes of memory occupied physically by
this [ArrayData].
pub fn get_array_memory_size(&self) -> usize {
- let mut size = 0;
- // Calculate size of the fields that don't have
[get_array_memory_size] method internally.
- size += mem::size_of_val(self)
- - mem::size_of_val(&self.buffers)
Review comment:
> embedded directly without a heap allocation in between.
I double checked too and I agree it now looks good. This whole notion is
confusing -- I think the tests you have added will really help in the future
too
--
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]