From: Andy Wingo <wingo@pobox.com>
To: Cedric Cellier <rixed@happyleptic.org>
Cc: guile-user@gnu.org
Subject: Re: Memory leak with threads + guile 1.8.7 ?
Date: Sat, 12 Feb 2011 15:20:05 +0100 [thread overview]
Message-ID: <m3y65l9vxm.fsf@unquote.localdomain> (raw)
In-Reply-To: <20100915134724.GA13622@securactive.net> (Cedric Cellier's message of "Wed, 15 Sep 2010 15:47:24 +0200")
Hi Cedric,
You posted a mail to the list some months ago:
On Wed 15 Sep 2010 15:47, Cedric Cellier <rixed@happyleptic.org> 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,
Andy
--
http://wingolog.org/
prev parent reply other threads:[~2011-02-12 14:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-15 13:47 Memory leak with threads + guile 1.8.7 ? Cedric Cellier
2011-02-12 14:20 ` Andy Wingo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3y65l9vxm.fsf@unquote.localdomain \
--to=wingo@pobox.com \
--cc=guile-user@gnu.org \
--cc=rixed@happyleptic.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).