From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA23574; Mon, 19 Jul 2004 14:21:56 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 OAA23942 for ; Mon, 19 Jul 2004 14:21:55 +0200 (MET DST) Received: from [128.93.8.158] (macaque.inria.fr [128.93.8.158]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i6JCLsEV016371 for ; Mon, 19 Jul 2004 14:21:54 +0200 Mime-Version: 1.0 (Apple Message framework v618) In-Reply-To: <40FC0BEF.4080909@univ-savoie.fr> References: <40FC0BEF.4080909@univ-savoie.fr> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <3B84CC2A-D97E-11D8-A7B0-00039310CAE8@inria.fr> Content-Transfer-Encoding: 7bit From: Damien Doligez Subject: Re: [Caml-list] GC and caml_oldify_local_roots taking too much time Date: Mon, 19 Jul 2004 14:21:59 +0200 To: caml-list X-Mailer: Apple Mail (2.618) X-Miltered: at nez-perce with ID 40FBBCE2.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; damien:01 damien:01 caml-list:01 oldify:01 raffalli:01 oldify:01 threads:01 recursion:01 threads:01 christophe:01 caml:01 caml:01 doligez:01 doligez:01 stacks:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Jul 19, 2004, at 19:59, Christophe Raffalli wrote: > What could cause the increase of time spent in caml_oldify_local_roots > ? > And what is this function in the first place ? It is the function that finds the roots of the memory graph: 1. in the stack 2. in the global C roots 3. among finalised values 4. in the stacks of other threads, if any I guess your program does one or more of the following: 1. allocate lots of stack space (deep recursion) 2. declare lots of C roots (with caml_register_global_root) 3. launch lots of threads that allocate big stacks I don't think finalised values can be the problem, because this particular set of roots is emptied after each minor collection. It should be possible to do something better for case (2), but if you declare arbitrary amounts of C roots, you will still pay the price at each major collection (instead of each minor collection as it is now). -- Damien ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners