From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: cell heap usage in 1.8 vs 1.6 Date: Mon, 08 Oct 2007 16:00:30 +0200 Organization: LAAS-CNRS Message-ID: <874ph1g0zl.fsf@laas.fr> References: <87ir7ff1ho.fsf@zip.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1191852026 1542 80.91.229.12 (8 Oct 2007 14:00:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 8 Oct 2007 14:00:26 +0000 (UTC) Cc: guile-devel@gnu.org To: Kevin Ryde Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Oct 08 16:00:24 2007 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Iet9j-0001kL-FR for guile-devel@m.gmane.org; Mon, 08 Oct 2007 16:00:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iet9d-000436-Gr for guile-devel@m.gmane.org; Mon, 08 Oct 2007 10:00:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iet9W-0003zM-Ui for guile-devel@gnu.org; Mon, 08 Oct 2007 10:00:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iet9U-0003wD-TI for guile-devel@gnu.org; Mon, 08 Oct 2007 10:00:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iet9U-0003vQ-9x for guile-devel@gnu.org; Mon, 08 Oct 2007 10:00:08 -0400 Original-Received: from laas.laas.fr ([140.93.0.15]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Iet9T-0008KB-K6 for guile-devel@gnu.org; Mon, 08 Oct 2007 10:00:07 -0400 Original-Received: from messiaen.laas.fr (messiaen [IPv6:2001:660:6602:0:230:65ff:fed4:9d20]) by laas.laas.fr (8.13.8/8.13.8) with SMTP id l98E01LX000561; Mon, 8 Oct 2007 16:00:02 +0200 (MEST) Original-Received: by messiaen.laas.fr (sSMTP sendmail emulation); Mon, 08 Oct 2007 16:00:30 +0200 X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 17 =?iso-8859-1?Q?Vend=E9miaire?= an 216 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu Mail-Followup-To: Kevin Ryde , guile-devel@gnu.org In-Reply-To: <87ir7ff1ho.fsf@zip.com.au> (Kevin Ryde's message of "Fri\, 17 Aug 2007 10\:28\:35 +1000") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Spam-Score: 0.306 () MAILTO_TO_SPAM_ADDR,NO_RELAYS X-Scanned-By: MIMEDefang at CNRS-LAAS on IPv6:2001:660:6602::2 X-Detected-Kernel: Solaris 10 (beta) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:6830 Archived-At: Hi, Kevin Ryde writes: > I'm having trouble in my charting program with the amount of heap space > allocated for cells in 1.8. It ends up allocating more and more heap > (as reported by gc-stats 'cell-heap-segments and confirmed by > mallinfo()), apparently without bound. I've got between 150k and 200k > objects according to gc-live-object-stats, which should be about 5Mb of > cells, but the heap keeps growing to as much as 60Mb. OK, I *think* I hit it with a long-running program with HEAD (this has become visible now that the thing has been running for more than 72 hours...). > (define (total-heap) > (apply + (map (lambda (elem) > (abs (- (cdr elem) (car elem)))) > (assoc-ref (gc-stats) 'cell-heap-segments)))) > > (define (count-alive) > (apply + (map cdr (gc-live-object-stats)))) Note that `count-alive' returns a number of objects, while `total-heap' (which really is "total *cell* heap") returns a number of bytes, right? Thus, the result of `count-alive' should be multiplied by 8 (regular cells) or 16 (double cells). Nevertheless, even when multiplying `count-alive' by 16, I get a `total-heap' an order of magnitude larger, which seems to confirm your hypothesis (that more heap is being allocated despite the availability of free cells). To be continued... Ludo'. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel