From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q04I3qUa015390 for ; Wed, 4 Jan 2012 19:03:57 +0100 X-IronPort-AV: E=Sophos;i="4.71,456,1320620400"; d="scan'208";a="137861104" Received: from arouen-553-1-246-20.w90-17.abo.wanadoo.fr (HELO macadam.home) ([90.17.210.20]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA; 04 Jan 2012 19:03:53 +0100 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) From: Damien Doligez In-Reply-To: <20120101124454.GA12851@annexia.org> Date: Wed, 4 Jan 2012 19:03:52 +0100 Content-Transfer-Encoding: 7bit Message-Id: <1453C993-CFD2-41AD-9611-A90398E560EC@inria.fr> References: <96F225D0-B458-4E25-BE34-3976989984B2@ezabel.com> <20120101124454.GA12851@annexia.org> To: Caml List X-Mailer: Apple Mail (2.1084) Subject: Re: [Caml-list] Understanding usage by the runtime On 2012-01-01, at 13:44, Richard W.M. Jones wrote: > Is compaction disabled? lablgtk disables it unconditionally by > setting the global Gc max_overhead (see also the Gc documentation): > > src/gtkMain.ml: > let () = Gc.set {(Gc.get()) with Gc.max_overhead = 1000000} Anyone who disables compaction should seriously consider switching to the first-fit allocation policy: let () = Gc.set {(Gc.get ()) with Gc.allocation_policy = 1} This may slow down allocations a bit, but the theory tells us that it completely prevents unbounded fragmentation of the OCaml heap. -- Damien