unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Tibi Turbureanu <tiberiuturbureanu@gmail.com>
To: guile-user@gnu.org
Cc: "Andy Wingo" <wingo@pobox.com>, "Ludovic Courtès" <ludo@gnu.org>
Subject: Re: Possible Memory Leak with stream-for-each
Date: Mon, 2 Aug 2010 06:29:05 +0300	[thread overview]
Message-ID: <20100802032905.GD4698@portabil> (raw)
In-Reply-To: <m3iq3vg9dg.fsf@unquote.localdomain>

Hello guys,

On Sat, Jul 31, 2010 at 01:48:27PM +0200, Andy Wingo wrote:
> So, it's not the case that the beginning of the stream was being held on
> to. Which is a bad thing -- it means that somehow something in the
> middle was being held on to.

Andy, I remember you said at GHM that we might not use libgc correctly.

Related to this, I found some tips in README.QUICK:

[quote]
Replace calls to malloc by calls to GC_MALLOC, and calls to realloc 
by calls to GC_REALLOC.
Define GC_DEBUG before including gc.h for additional checking.
[\quote]

We also have GC_malloc_* calls in Guile and maybe we should have only
GC_MALLOC_* calls so that the debugging mode can work (just defining
GC_DEBUG before including gc.h gives a segfault).

There is also a warning:

[quote]
Do not store the only pointer to an object in memory allocated
with system malloc, since the collector usually does not scan
memory allocated in this way.
[/quote]

But I haven't studied the code yet to tell if we respect this.

What do you guys think?

Tibi



  parent reply	other threads:[~2010-08-02  3:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-19 18:08 Possible Memory Leak with stream-for-each Abhijeet More
2010-07-20 20:36 ` Andy Wingo
2010-07-21  7:00   ` Tristan Colgate
2010-07-24 16:13 ` Ludovic Courtès
2010-07-24 16:32   ` Abhijeet More
2010-07-24 16:46     ` Abhijeet More
2010-07-26  9:36       ` Andy Wingo
2010-07-30  0:38         ` Abhijeet More
2010-07-31 11:48           ` Andy Wingo
2010-07-31 20:16             ` Abhijeet More
2010-08-11 16:57               ` Abhijeet More
2010-08-02  3:29             ` Tibi Turbureanu [this message]
2010-08-15 15:12             ` Heap profiler Ludovic Courtès
2010-09-02 12:49 ` Possible Memory Leak with stream-for-each Ludovic Courtès
2010-09-02 16:20   ` Julian Graham
2010-09-02 18:46   ` Andy Wingo

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=20100802032905.GD4698@portabil \
    --to=tiberiuturbureanu@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=ludo@gnu.org \
    --cc=wingo@pobox.com \
    /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).