2 ms·
FWIW, the behavior of call/cc, et. al., is implementation dependent, and memory leakiness varies considerably. I tried the "memory leak" tests in Chicken (4.9.
by jrapdx3 12y ago
FWIW, the behavior of call/cc, et. al., is implementation dependent, and memory leakiness varies considerably.
I tried the "memory leak" tests in Chicken (4.9.1) using the CSI REPL. The only modification made to the example "gen-leak.scm" was uncommenting the (display ...) line in (print-stream ...).
The result with (print-stream #f (gen-stream ones)) was non-terminating production of "1", like an infinite loop, but it didn't run out of memory, even after running >10 minutes in a resource-constrained VM.
I'm not familiar enough with how call/cc is implemented in Scheme48 vs. Chicken to comment in detail, but I'm sure there are substantial differences. The Chicken site (http://call-cc.org http://call-cc.org) provides quite a bit of info about its own implementation.