From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 103F1BB84 for ; Fri, 2 Jun 2006 21:55:32 +0200 (CEST) Received: from smtp10.wanadoo.fr (smtp10.wanadoo.fr [193.252.22.21]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k52JtVRA031453 for ; Fri, 2 Jun 2006 21:55:31 +0200 Received: from morgana (ARennes-257-1-164-247.w86-214.abo.wanadoo.fr [86.214.75.247]) by mwinf1003.orange.fr (SMTP Server) with ESMTP id 72D792000333; Fri, 2 Jun 2006 21:55:31 +0200 (CEST) X-ME-UUID: 20060602195531470.72D792000333@mwinf1003.orange.fr Received: from david by morgana with local (Exim 4.50) id 1FmFl0-0001Os-Vy; Fri, 02 Jun 2006 21:56:30 +0200 To: Florian Weimer Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Inhibiting heap compaction References: <87y7wfxs7y.fsf@mid.deneb.enyo.de> From: David MENTRE Organization: none Date: Fri, 02 Jun 2006 21:56:30 +0200 In-Reply-To: <87y7wfxs7y.fsf@mid.deneb.enyo.de> (Florian Weimer's message of "Fri, 02 Jun 2006 21:39:13 +0200") Message-ID: <87ac8vz5zl.fsf@linux-france.org> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at concorde with ID 448097B3.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; compaction:01 compaction:01 libref:01 mutable:01 lablgtk:01 heap:01 heap:01 writes:01 caml-list:01 int:01 data:02 caml:02 florian:02 parameters:02 objects:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Hello, Florian Weimer writes: > Is it possible to prevent the heap from being compacted, or pin > individual objects? You can prevent heap compaction: http://caml.inria.fr/pub/docs/manual-ocaml/libref/Gc.html#TYPEcontrol mutable max_overhead : int; (* Heap compaction is triggered when the estimated amount of "wasted" memory is more than max_overhead percent of the amount of live data. If max_overhead is set to 0, heap compaction is triggered at the end of each major GC cycle (this setting is intended for testing purposes only). If max_overhead >= 1000000, compaction is never triggered. Default: 500. *) Use Gc.set to change those parameters. Best wishes, d. PS: I think Lablgtk prevent heap compaction for similar reasons. -- pub 1024D/A3AD7A2A 2004-10-03 David MENTRE 5996 CC46 4612 9CA4 3562 D7AC 6C67 9E96 A3AD 7A2A