[Top][All Lists]

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

Re: Memory leak with threads + guile 1.8.7 ?

From: Andy Wingo
Subject: Re: Memory leak with threads + guile 1.8.7 ?
Date: Sat, 12 Feb 2011 15:20:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hi Cedric,

You posted a mail to the list some months ago:

On Wed 15 Sep 2010 15:47, Cedric Cellier <address@hidden> writes:

> I'm using guile in an C program that spawn a lot of short lived
> threads, each of which passing in guile mode (guile 1.8.7), and I'm
> facing a memory leak even when the threads does nothing (ie. the
> C function called by scm_with_guile consists only of a return NULL.
> After some time, if I call a gc-stats I have many many segments of
> 21Mb allocated, although gc-live-object-stats reports that almost
> nothing is alive (acording to expectations).
> I am under the impression that some of these segments, created by a
> now defunct thread, can not be reused by others.
> So I made a small program that continuously creates thread and run
> a NOP scm_with_guile in it, and then join it (so that thre thread local
> storage itself is not leaked).
> With the useless scm_with_guile call, this programm leaks memory
> very quickly. Comment out the scm_with_guile call and there is no more
> leak.
> What do you think ?

It's a bug, but with interesting implications in 1.9.  I have filed bug
#32436 about this.

Thanks for the test case,


reply via email to

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