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 5B122BB9A for ; Thu, 27 Oct 2005 16:24:57 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j9REOukf011847 for ; Thu, 27 Oct 2005 16:24:57 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA01024 for ; Thu, 27 Oct 2005 16:24:56 +0200 (MET DST) Received: from [127.0.0.1] (yquem.inria.fr [128.93.8.37]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j9REOkpj011786; Thu, 27 Oct 2005 16:24:47 +0200 In-Reply-To: <20051025192045.GB31792@fast-mail.cs.uchicago.edu> References: <20051024175339.GA4331@fast-mail.cs.uchicago.edu> <0DF4E6A7-C09B-419C-AFDC-4B98DC2A7692@inria.fr> <20051025192045.GB31792@fast-mail.cs.uchicago.edu> Mime-Version: 1.0 (Apple Message framework v734) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <7A88FB83-06B5-41FE-96BA-44718161C24A@inria.fr> Cc: caml users Content-Transfer-Encoding: 7bit From: Damien Doligez Subject: Re: [Caml-list] GC question. Date: Thu, 27 Oct 2005 16:25:00 +0200 To: MATTHEW HAMMER X-Mailer: Apple Mail (2.734) X-Miltered: at nez-perce with ID 4360E338.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4360E32E.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; damien:01 damien:01 caml-list:01 garbage:01 ocaml:01 runtime:01 generational:01 generations:01 generational:01 garbage:01 minor:01 heap:01 heap:01 bigarrays:01 malloc:01 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 On Oct 25, 2005, at 21:20, MATTHEW HAMMER wrote: > I'm not certain what style of garbage collection is done in the ocaml > runtime environment, Generational with two generations, and incremental for the old generation. > but if its generational for example, I'd like to > move certain values into the 'oldest' generation, so that the garbage > collector doesn't waste time on them. The only way to do that is to call Gc.minor, but it won't save any time. > The running program in question has a large datastructure that is very > persistent which takes a lot of GC time if it is transversed too > often. If it's large, it's going to be in the major heap anyway. If you don't want the GC to traverse it, you'll have to put it outside the heap, but it might will require a lot of work. For example, bigarrays are outside the heap. Or you could write some C code to build your structure out of malloc blocks, but I'd count that as a desperate measure. > So I suppose what I'm asking is: is there a way to give the GC'er > 'hints' through the Obj module, or any other method? You can control some parameters with the Gc module, but there's no way to give hints about a specific piece of data. -- Damien