Exactly, but only for globals.
And with clean stack I meant that there were no previous function calls that placed other values on the stack that would still be there when subsequent function calls reuse the same memory locations. Since the system will always execute pretty much the same functions prior to your own function the "residues" on the stack (where local automatic variables are stored) will mostly be the same. And the
String constructor is also a function that will leave some stuff on the stack which can end up in the string as these bytes will be placed back to back with the still present variables of the calling function.
A only gets its length after all the costruction, heap allocation and string copying has already happened.
For the location of variables I have no good answer, but the optimizer and linker may have a say in that. It may also look different on a completely fresh project with no precompiled modules.