program t16( input, output ) ;
procedure recursive(i:integer); begin if i<2000 then recursive(i+1); end;
begin recursive(0) ; end.
This completes for me. (Windows XP, MinGW) The procedure uses 0x18 bytes of stack per call.
If your procedure has local variables, that increases the size of its stack frame. If your procedure has an argument that is a structure or array that is being passed by value, the compiler will be making a copy in the stack frame of the current invocation before calling the next level.
You can use "gdb" to look at the first few instructions of your procedure. I think if you compile with a "-S" option, you will have an assembly language source file to look at.