Returns the total number of bytes of memory occupied by the buffers owned by this [`ArrayData`] and all of its children. (See also diagram on [`ArrayData`]). Note that this [`ArrayData`] may only refer to a subset of the data in the underlying [`Buffer`]s (due to `offset` and `length`), but the size returned includes the entire size of the buffers. If multiple [`ArrayData`]s refer to the same un
(&self)
| 482 | /// If multiple [`ArrayData`]s refer to the same underlying |
| 483 | /// [`Buffer`]s they will both report the same size. |
| 484 | pub fn get_buffer_memory_size(&self) -> usize { |
| 485 | let mut size = 0; |
| 486 | for buffer in &self.buffers { |
| 487 | size += buffer.capacity(); |
| 488 | } |
| 489 | if let Some(bitmap) = &self.nulls { |
| 490 | size += bitmap.buffer().capacity() |
| 491 | } |
| 492 | for child in &self.child_data { |
| 493 | size += child.get_buffer_memory_size(); |
| 494 | } |
| 495 | size |
| 496 | } |
| 497 | |
| 498 | /// Returns the total number of the bytes of memory occupied by |
| 499 | /// the buffers by this slice of [`ArrayData`] (See also diagram on [`ArrayData`]). |