[Top][All Lists]

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

Re: scm_eval_string memory leak in 1.7 ?

From: Marius Vollmer
Subject: Re: scm_eval_string memory leak in 1.7 ?
Date: Wed, 22 Sep 2004 03:27:32 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Roland Orre <address@hidden> writes:

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

Can you give a complete, runnable example?  Without knowing exactly
what your program does, it is very hard to reproduce your problem.

> 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.

Yes, this looks indeed like a problem.  However, scm_cells_allocated
is only used for statistics, and having it overflow (or underflow?)
should not influence the rest of Guile.

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

What should that function do?  Maybe scm_c_read_string is what you are
looking for?  It is 'just like' eval, except that it doesn't evaluate.

GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405

reply via email to

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