From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tibi Turbureanu Newsgroups: gmane.lisp.guile.user Subject: Re: Possible Memory Leak with stream-for-each Date: Mon, 2 Aug 2010 06:29:05 +0300 Message-ID: <20100802032905.GD4698@portabil> References: <87iq44yi1q.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1280768732 14431 80.91.229.12 (2 Aug 2010 17:05:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Aug 2010 17:05:32 +0000 (UTC) Cc: Andy Wingo , Ludovic =?iso-8859-1?Q?Court=E8s?= To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Aug 02 19:05:28 2010 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OfyS0-00072w-OL for guile-user@m.gmane.org; Mon, 02 Aug 2010 19:05:21 +0200 Original-Received: from localhost ([127.0.0.1]:49211 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfyF4-0004Ev-9y for guile-user@m.gmane.org; Mon, 02 Aug 2010 12:51:58 -0400 Original-Received: from [140.186.70.92] (port=56227 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfliE-0002nx-50 for guile-user@gnu.org; Sun, 01 Aug 2010 23:29:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OfliD-0003Li-40 for guile-user@gnu.org; Sun, 01 Aug 2010 23:29:13 -0400 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:45157) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfliC-0003LR-Um; Sun, 01 Aug 2010 23:29:13 -0400 Original-Received: by bwz9 with SMTP id 9so1953208bwz.0 for ; Sun, 01 Aug 2010 20:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=EBuvYQ+s3FTXEiKOx1fiu9RkXdN1VRD6asizpgV/9M0=; b=XC8rbH/UJn3OwMHdQBG6RkBU5ZLp7lLlsGQIosrvph7nDKqwYsZfqefTjxwbaUAgDE RxFs1e/vbx4hqW/wR1BBCAAOOlOZWW4wsWpqRyaxslDwl7YbYRv0Gfen1jHofPAhzvtr +5GujX3CTQyYQilSzGS61/bFRz+NeKu5krvMs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=UXOIHnfu2Yh/happdHGQFejRGZ0xY2eWqcJ1I5ZBeXwGvq2EPGV6NdwaVzBYwhhUJr Co5BdJQ3vQixRpTtW1dU2v8dWE6fB9fyLHB/UB7BkL3W8UiHldsM49K3mWUu9ZZbmn7/ oot7UY/rCn/z1O5PS2pMGjBod5Y8VUU35fems= Original-Received: by 10.204.80.162 with SMTP id t34mr3741116bkk.81.1280719751092; Sun, 01 Aug 2010 20:29:11 -0700 (PDT) Original-Received: from portabil ([86.126.113.96]) by mx.google.com with ESMTPS id f10sm3722633bkl.17.2010.08.01.20.29.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 01 Aug 2010 20:29:09 -0700 (PDT) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Mon, 02 Aug 2010 12:50:16 -0400 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8044 Archived-At: 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