I'm using ATTINY84, and one problem is the size of the SRAM. The other problem is that ATTINY84 will not be produced anymore, but ... arduino forum can't help for that.
Actually, my sketch give me that information :
Sketch uses 6962 bytes (84%) of program storage space. Maximum is 8192 bytes.
Global variables use 359 bytes (70%) of dynamic memory, leaving 153 bytes for local variables. Maximum is 512 bytes.
if i count all "global" var, i get ~300B of memory used, but i dont get where is used the 59B others. Maybe from the arduino library like arduino.h but i don't know.
I tried googling information about memory usage, but most of case, i get memory usage on running arduino, but can't get information from the compiler.
Is there a way to get it ? Like a list :
var1 - 1B
var2 - 4B
...
Sure, but functions are not loaded into RAM on AVR, they appear in flash only.
No, the stack is used for local variables, saved registers, and function return addresses. Not for the functions themselves.
Some architectures do support having functions in RAM (e.g. your x86 or ARM PC, ESP32 and ARM microcontrollers, etc.), but AVR is based on a Harvard architecture, which separates code and data, so it cannot execute code from RAM.