Skip to contentSkip to conversation

Memory tracker in c++

DISCUSSION Mauro Ziliani 2 participants 2 messages Mar 5, 2021 – Mar 6, 2021

lore
Share & tools
lore
#0 lore raw

Hi all
I'm looking for a memory track to investigate how many memory my application needs. The application di made with Qt/Qml 5.6 over a Krogoth on Imx6dl board.

Do you have some suggestion?
I'd initialize the library in the main()
Then I run some function to get the memory consumption

I try valgrind but it is too heavy for the poor imx
Thanks all
MZ
Sent from Mailspring (https://getmailspring.com/), the best free email app for work

#1 lore raw
Quoted 8 lines · Mauro Ziliani

Hi all
I'm looking for a memory track to investigate how many memory my application needs. The application di made with Qt/Qml 5.6 over a Krogoth on Imx6dl board.

Do you have some suggestion?

I'd initialize the library in the main()
Then I run some function to get  the memory consumption

glibc has mallinfo:

https://stackoverflow.com/questions/8335402/how-to-find-how-much-memory-is-actually-used-up-by-a-malloc-call

Quoted 2 lines

I try valgrind but it is too heavy for the poor imx

Yep, it's a beast!

There are lighter memory debuggers such as the AddresssSanitizer:

https://stackoverflow.com/questions/47251533/memory-address-sanitizer-vs-valgrind

which links to a small wiki: Address Sanitizer Comparison Of Memory Tools

https://github.com/google/sanitizers/wiki/AddressSanitizerComparisonOfMemoryTools

Let us know if either of those approaches work for you.

Good luck,

../Randy

Quoted 9 lines

Thanks all

MZ

Sent from Mailspring <https://getmailspring.com/>, the best free email app for work

Signature · 2 lines
# Randy MacLeod
# Wind River Linux