yeepaa
yeepaa

Reputation: 1

Is there any program (similar to Valgrind) that can be used to find the amount of statically allocated memory (given a bin file)?

I saw Valgrind is quite useful for things like memory leaks but it is focused more on dynamic memory. Is there any tool that can help analyze static memory?

Haven't really found any tool that can help me with my issue.

Upvotes: -1

Views: 81

Answers (1)

0___________
0___________

Reputation: 67835

Only if you have the executable file which has section information (like .elf), you can see static storage duration segments sizes.

When you compile, you can generate a map file which will show all your segments, function & variable addresses and their sizes.

You will not be able to analyze the sizes of the automatic storage duration objects

If you have only a .bin file - it is not possible as it does not contain any information about the program memory layout.

Upvotes: 2

Related Questions