in reply to Re^2: sub calls and memory use
in thread sub calls and memory use
See goto. You pass arguments in @_, as always.
Of course, when calling any function, the call stack still grows since the return address needs to be stored on the call stack. This is independent of any function parameters (or none) passed to the next recursive invocation.
Update: As the replies below also point out, I answered too quickly. I thought you were still calling the function but with empty parameters. If you're using goto to transfer control to the function, there should be no memory growth, as the replies also say.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: sub calls and memory use
by LanX (Saint) on Nov 16, 2019 at 14:55 UTC | |
by dave_the_m (Monsignor) on Nov 16, 2019 at 15:30 UTC | |
|
Re^4: sub calls and memory use
by Anonymous Monk on Nov 16, 2019 at 14:43 UTC | |
by LanX (Saint) on Nov 16, 2019 at 15:03 UTC | |
by Anonymous Monk on Nov 16, 2019 at 15:35 UTC |