[PD] What exactly is a "stack overflow" ?
russell at russellbryant.net
Thu Dec 20 00:49:44 CET 2007
Frank Barknecht wrote:
> If people want to make sure to not be bitten by the endless loop, they
> could just use
> [f 1000000000000]
> | [inlet]
> | |
> as an abstraction called: [funtil] It will bang 1000000000000 times
> unless stopped, which is more bangs for the bang than most people
> would want.
It doesn't look like that would work. The number of times to run is stored as
an int, which on most systems is 4-bytes. The maximum is a bit over 2 billion
for a float input. :)
Also, from looking at the implementation of [until], a simple bang until will
stop after a complete overflow over the storage space in an integer, which is
usually 4 billion and change.
(x_count is an int.)
static void until_bang(t_until *x)
x->x_run = 1;
x->x_count = -1;
while (x->x_run && x->x_count)
More information about the Pd-list