[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Strange memory leak with lazy-seq

From: Kooda
Subject: [Chicken-users] Strange memory leak with lazy-seq
Date: Mon, 23 Feb 2015 13:57:21 +0100
User-agent: Mutt/1.5.23 (2014-03-12)


I’ve been playing with lazy-seq for the past few days and found a very
strange behaviour:

The heap of the following program keeps growing rapidly in csi, running
the same program after compilation seems to slow down the growth quite a
lot but the heap isn’t constant as I was expecting it to be.

Here is a test case of the problem:

; Start this script with `csi -:D -:hi100k -:hg101` to observe heap resizing

(use lazy-seq)

(define (complex-stream seq)
  (lazy-map identity seq))

; This seems to leak:
(lazy-each void (complex-stream (lazy-numbers)))

; This doesn't:
#;(lazy-each void (lazy-map identity

Envoyé depuis ma GameBoy.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]