1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #lang scheme ;;; SI 413 Fall 2012 ;;; Example to show memory allocation in Scheme ;;; Calling (go size) just starts allocating ;;; vectors of that size... forever! (define (go size) (go-and-count size 0)) (define (go-and-count size i) (let ((v (make-vector size 0))) (display i) (newline) (go-and-count size (add1 i)))) |