Explain program space

After compiling my ESP32 sketch says:
"Sketch uses 215.697 bytes (16%) of program storage space. Maximum is 1.310.720 bytes.
Global variables use 15500 bytes (4%) of dynamic memory, leaving 312.180 bytes for local variables. Maximum is 327680 bytes."
The first line is perfectly clear: That's what it is!
But
Why do I have only "312.180 bytes available for local variables"?

Can I enlarge "dynamic memory" at the expense of "program storage space"?

I know there is IRAM, SRAM and DRAM in the ESP32, but the explanation about how to use it is very verbose and not clear (to me).

What is 327680 - 15500?

pagemaker:
Can I enlarge "dynamic memory" at the expense of "program storage space"?

No, program space is something that is slowly "burned in". (Think of it like a slow hard drive) Data space is just held there while power is on and can be changed in the wink of an eye. Well, they can all be changed in the wink of an eye.. But data space is a lot faster wink and it doesn't ware out like code space will.

-jim lee

pagemaker:
Why do I have only "312.180 bytes available for local variables"?

The only is quite funny.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.