Is there any way to find the space allocated to various variables and files when compiled with gcc compiler.
Asked
Active
Viewed 87 times
0
-
"files"? No. Variables, functions, possibly. – Jonathon Reinhart Mar 27 '13 at 04:50
-
http://stackoverflow.com/questions/11410037/how-to-get-the-size-of-a-c-function, http://stackoverflow.com/questions/5334027/how-to-find-the-address-length-of-a-c-function-at-runtime-mingw – Jonathon Reinhart Mar 27 '13 at 04:50
1 Answers
0
You can easily use the map file to find the allocations for static varibles.
If you want to sort this information based on the file containing the declaration one would have to write a program that does that, which should be possible. Same goes for code allocation.

user3613805
- 21
- 2