Embedded Software Development - Memory usages

Thread Starter

Kittu20

Joined Oct 12, 2022
470
How do you determine how much memory is being used by the c program, and is there a any tool do you use to determine where variables being stored in memory sections such as text, data, stack and heap?
 

MrChips

Joined Oct 2, 2009
30,810
How do you determine how much memory is being used by the c program, and is there a any tool do you use to determine where variables being stored in memory sections such as text, data, stack and heap?
Every compiler generates a list file. You can view the list (or listing) file to see the asm codes generated. Many compilers will also generate a map file. The map file will show you a summary of all memory usage, and all locations of variables and functions.
 
Top