[Top][All Lists]

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

scm_eval_string memory leak in 1.7 ?

From: Roland Orre
Subject: scm_eval_string memory leak in 1.7 ?
Date: Tue, 21 Sep 2004 12:57:39 +0200

I'm using 1.7
It seems as scm_eval_string leaves memory which is not garbed away.

I was reading 3.1 million lines of the format:
827,98005,73,6,3,16,1,(417),(39 68 418),(116 218 226 229 304 722)
and as a quick solution for each s-expr found I added a "'" and
called scm_c_eval_string, but the memory grew very large. The
process used 2.6 GB.

After changing the scm_c_eval_string to an own hack mem2list
the problem disappeared and the memory usage went down to 359MB.

After having fixed this I found another strange thing with gc-stats
This is a list of cells-allocated during the read.

ix=500000 (cells-allocated . 57293)
ix=600000 (cells-allocated . 37930)
ix=700000 (cells-allocated . 19090)
ix=800000 (cells-allocated . 4294966666)
ix=900000 (cells-allocated . 4294947441)
ix=1000000 (cells-allocated . 4294928824)

Obviously the number 4294966666 is wrong (negative?) as it would
be a bignum and the process at that time only used a few MB of mem.

Apart from this, is there somewhere a more general mem2list function
available somewhere?

        Best regards
        Roland Orre

reply via email to

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