[PD] What exactly is a "stack overflow" ?

Martin Peach martin.peach at sympatico.ca
Mon Dec 17 20:44:41 CET 2007

The stack is a block of memory that is reserved by the cpu for saving the 
location of the next instruction to execute and register contents before 
jumping to a subroutine or interrupt handler.
It is also used to save the parameters of a function call.
When the subroutine is completed the program continues where it left off, by 
retrieving the most recently added address and register contents from the 
The cpu signals an overflow whenever the stack space runs out (the program 
tries to access the stack beyond its boundaries)
This usually occurs when the program repeatedly calls the same subroutine 
from within (recursion) and doesn't return.
In pd it usually means you have a loop somewhere, so that the output of an 
object is feeding its own input: each time a new output is calculated a new 
input is generated, so the process never ends and eventually the stack 


David Schaffer wrote:
>To: "pd list" <pd-list at iem.at>
>Subject: [PD] What exactly is a "stack overflow" ?
>Date: Mon, 17 Dec 2007 19:47:22 +0100
>Can anyone explain me what a "stack overflow" error is (at least what it 
>means in Pd) and what I can do about it?! Thank you
>                       D.S

>PD-list at iem.at mailing list
>UNSUBSCRIBE and account-management -> 

More information about the Pd-list mailing list