I think Yaron is looking more for the APIs in arrow/util/byte_size.h [1] which 
has utilities for estimating the size of the buffers in an array or record 
batch. (I'm assuming you're not concerned with the size of the C++ structures 
themselves.)

[1]: https://github.com/apache/arrow/blob/master/cpp/src/arrow/util/byte_size.h

On Fri, Oct 28, 2022, at 09:40, Rok Mihevc wrote:
> Hey Yaron,
>
> If you're using jemalloc you can use jemalloc_get_stat [1] to monitor total
> memory allocation. Another option would be LoggingMemoryPool, see tests on
> possible usage [2].
>
> Rok
>
> [1]
> https://github.com/apache/arrow/blob/master/cpp/src/arrow/memory_pool_jemalloc.cc#L157
> [2]
> https://github.com/apache/arrow/blob/master/cpp/src/arrow/memory_pool_test.cc
>
> On Fri, Oct 28, 2022 at 3:10 PM Yaron Gvili <rt...@hotmail.com> wrote:
>
>> Hi,
>>
>> Is there a supported/convenient way for measuring the memory usage of
>> Arrow structures? For my specific use case, measuring memory usage of
>> either a record batch or an array would be sufficiently convenient.
>>
>>
>> Cheers,
>> Yaron.
>>

Reply via email to