For simple code and a good compiler, there is no difference, but for a naive compiler with a non-recursive recursive function, you will end up with a stack space called stack overflow.
As for the questions: in the stack overflow: the stack is mapped to a location or memory (for each process) that has unallocated memory next to it. The stack is used to store the values โโof local functions, the return address of the current function is also placed on the stack, and then the values โโare transferred to the stack. Thus, the stack consumption for each function call. Therefore, when the processor tries to access memory, skip the end of the allocation space, thus causing a memory access exception and is interpreted as a stack overflow.
For some time (1), the behavior of the operating system depends on what kind of multitasking behavior you are using the OS. For a proactive system (such as Window NT and newer), it just sees that your process has a lot of work, but if it has a user interface and you do not respond to the windows you send, you will receive a message "This application seems to have stopped respond".
Somewhere, as if you had an OS other than proactive, then it will hang if you do not remove control over the OS, so in Windows 3.1 days the printer driver will freeze the entire system during printing. Well, the HP drivers did.
In an embedded system, in order to avoid software blocking, they usually have a hardware timer called a watchdog timer, which, if not tickled every second, will reboot the system. Thus, preventing the system from staying in a locked state.
Simeon pilgrim
source share