[Top][All Lists]

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

Memory leak with threads + guile 1.8.7 ?

From: Cedric Cellier
Subject: Memory leak with threads + guile 1.8.7 ?
Date: Wed, 15 Sep 2010 15:47:24 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

Hello dear hackers !

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

What do you think ?

Attachment: Makefile
Description: Text document

Attachment: many_threads.c
Description: Text Data

reply via email to

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