Stack size calculation and memory inyernals

Hello, as a programmer that is very much interested in the low level details of my job, I would love to know the answer to some questions regarding the R32C processor standard compiler.

1. When I compile the program, i can see that the resulting binary's (MOT file analyzed with ida and similar tools) stack begins at a low offset, and grows downwards. Is it then not possible that with continuous recursion the address 0 can be reached? On modern OSs we have guard pages, but without an OS, it seems that this condition is inevitable here.

2. How is this address for the beggining of the stack determined?

  1. Thank you very much, would love to hear back from you.