From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Han-Wen Nienhuys Newsgroups: gmane.lisp.guile.bugs,gmane.lisp.guile.devel Subject: substantial performance loss when running long-lived or computationally intensive programs Date: Wed, 14 May 2003 13:14:14 +0200 Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Message-ID: <16066.9478.131532.331041@localhost.localdomain> References: <20030505.223626.84190828.wells@email.mot.com> Reply-To: hanwen@cs.uu.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1052911276 27548 80.91.224.249 (14 May 2003 11:21:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 14 May 2003 11:21:16 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed May 14 13:21:14 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19FuJ4-00077p-00 for ; Wed, 14 May 2003 13:20:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19FuEd-0004dB-01 for guile-bugs@m.gmane.org; Wed, 14 May 2003 07:15:47 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19FuD5-00049r-00 for bug-guile@gnu.org; Wed, 14 May 2003 07:14:11 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19FuCw-00047j-00 for bug-guile@gnu.org; Wed, 14 May 2003 07:14:03 -0400 Original-Received: from smtpzilla1.xs4all.nl ([194.109.127.137]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19Fu2N-0001vS-00; Wed, 14 May 2003 07:03:08 -0400 Original-Received: from localhost.localdomain.xs4all.nl (byrd.xs4all.nl [213.84.26.127]) by smtpzilla1.xs4all.nl (8.12.9/8.12.9) with ESMTP id h4EB30Vn073808; Wed, 14 May 2003 13:03:00 +0200 (CEST) Original-To: michaelawells@motorola.com In-Reply-To: <20030505.223626.84190828.wells@email.mot.com> X-Mailer: VM 7.14 under Emacs 21.2.1 Original-cc: bug-guile@gnu.org X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GUILE, GNU's Ubiquitous Extension Language List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.bugs:791 gmane.lisp.guile.devel:2357 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.bugs:791 michaelawells@motorola.com writes: > The Guile interpreter comes to a near halt after making a sufficiently > large number of calls to guile built-ins which do not appropriately > maintain the 'scm_mallocated' variable (declared in "libguile/gc.c"). > There appears to be a widespread misunderstanding as to how > 'scm_mallocated' should be maintained. > > There is no comment in "libguile/gc.c" which describes what > 'scm_mallocated' should contain, but by looking through the code, it > appears that 'scm_mallocated' should correspond to the total number of > bytes obtained through malloc currently held by the interpreter. Your analysis is probably correct (I didn't check in detail), but I'm not sure if it would be a good idea to fix all of the instances. It would touch a lot of code for a stable release. The things you found are fixed in 1.7. > As 'scm_mallocated' approaches 2^32, the value of 'scm_mtrigger' may be > set to a value _intended_ to be higher than 'scm_mallocated', but ends > up wrapping around to a value lower than 'scm_mallocated'. > It is also possible that 'scm_mallocated' will wrap around as well. I've added checks in scm_gc_register_collectable_memory() in HEAD to catch these corner-case mistakes. (This fix might be eligible for backporting to 1.6, although they are probably moot when the other problems you indicated aren't fixed). One thing that does nag me, is code in srcprop.c that manipulates scm_mallocated directly and doesn't call scm_gc_register_collectable_memory(). Is there a good reason for this? -- Han-Wen Nienhuys | hanwen@cs.uu.nl | http://www.cs.uu.nl/~hanwen _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://mail.gnu.org/mailman/listinfo/bug-guile