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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id AD698BB84 for ; Fri, 2 Jun 2006 22:25:25 +0200 (CEST) Received: from mallaury.nerim.net (smtp-105-friday.noc.nerim.net [62.4.17.105]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k52KPPNW019835 for ; Fri, 2 Jun 2006 22:25:25 +0200 Received: from karryall.dnsalias.org (karryall.dnsalias.org [213.41.240.180]) by mallaury.nerim.net (Postfix) with ESMTP id 80C544F3A4; Fri, 2 Jun 2006 22:25:12 +0200 (CEST) Received: by karryall.dnsalias.org (Postfix, from userid 500) id C534C284057; Fri, 2 Jun 2006 22:25:24 +0200 (CEST) From: Olivier Andrieu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17536.40628.573298.310156@karryall.dnsalias.org> Date: Fri, 2 Jun 2006 22:25:24 +0200 To: Florian Weimer Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Inhibiting heap compaction In-Reply-To: <87y7wfxs7y.fsf@mid.deneb.enyo.de> References: <87y7wfxs7y.fsf@mid.deneb.enyo.de> X-Mailer: VM 7.19 under Emacs 21.4.1 X-Miltered: at nez-perce with ID 44809EB5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; andrieu:01 oandrieu:01 nerim:01 compaction:01 afaik:01 2006:98 heap:01 heap:01 caml-list:01 minor:01 strings:01 strings:01 int:01 florian: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 Florian Weimer [Friday 2 June 2006] : > > Is it possible to prevent the heap from being compacted, Yes. cf the function Gc.set Gc.set { (Gc.get()) with Gc.max_overhead = max_int } > or pin individual objects? AFAIK, no > Currently, I copy all strings used in such a scenario, but this > adds quite a bit of overhead. Mind that your strings need to be in the major heap for the no-heap-compaction approach to work. To ensure this, your strings must be long enough or you should call Gc.minor () before calling the C function. -- Olivier