From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.user Subject: Re: What is best way to limit memory alloc? Date: Sat, 01 Sep 2007 10:02:47 +1000 Message-ID: <87zm076ymw.fsf@zip.com.au> References: <1188367992.8043.508.camel@localhost.localdomain> <1188382968.8043.578.camel@localhost.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1188604988 19565 80.91.229.12 (1 Sep 2007 00:03:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 1 Sep 2007 00:03:08 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Sep 01 02:03:05 2007 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.50) id 1IRGS5-00081I-8N for guile-user@m.gmane.org; Sat, 01 Sep 2007 02:03:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IRGS4-0001n3-F6 for guile-user@m.gmane.org; Fri, 31 Aug 2007 20:03:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IRGRz-0001mg-Ay for guile-user@gnu.org; Fri, 31 Aug 2007 20:02:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IRGRy-0001mT-Py for guile-user@gnu.org; Fri, 31 Aug 2007 20:02:55 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IRGRy-0001mQ-KZ for guile-user@gnu.org; Fri, 31 Aug 2007 20:02:54 -0400 Original-Received: from mailout2-8.pacific.net.au ([61.8.2.231] helo=mailout2.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IRGRx-0002dU-QU for guile-user@gnu.org; Fri, 31 Aug 2007 20:02:54 -0400 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id 432381098C7 for ; Sat, 1 Sep 2007 10:02:37 +1000 (EST) Original-Received: from localhost (ppp23E0.dyn.pacific.net.au [61.8.35.224]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 19E1327404 for ; Sat, 1 Sep 2007 10:02:51 +1000 (EST) Original-Received: from gg by localhost with local (Exim 4.67) (envelope-from ) id 1IRGRr-0000xv-P5 for guile-user@gnu.org; Sat, 01 Sep 2007 10:02:47 +1000 In-Reply-To: <1188382968.8043.578.camel@localhost.localdomain> (Roland Orre's message of "Wed, 29 Aug 2007 12:22:47 +0200") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) 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:6120 Archived-At: Roland Orre writes: > >> What is the best way to limit the memory allocation in guile? Perhaps setrlimit would be the most reliable overall. >> I'm still running 1.7 as I haven't got the time and energy >> to change the array implementation yet. I struck a bug lately in 1.8 where the collected cell counts are somehow botched, leading to it wrongly thinking new heap is needed again and again. >> It seems as the memory allocator in guile doesn't care about >> the physical memory limits and it seems as it prefers to >> allocate big chunks of more memory instead of performing gc >> despite very little extra memory should be needed. It's not supposed to. The rule is supposed to be to increase the heap to make 40% of it free, after gc figures what's free and what's not, or something like that. In practice it means blocks each 1.6x (or so) bigger than the one before getting allocated. (As seen in `gc-stats'.) _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user