From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA09072 for caml-redistribution; Wed, 15 Dec 1999 10:52:04 +0100 (MET) 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 JAA15107 for ; Wed, 15 Dec 1999 09:41:24 +0100 (MET) Received: from nenuphar.saclay.cea.fr (nenuphar.saclay.cea.fr [132.166.192.7]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id JAA22071; Wed, 15 Dec 1999 09:41:22 +0100 (MET) Received: from orion.serma.cea.fr (orion.serma.cea.fr [132.166.151.161]) by nenuphar.saclay.cea.fr (8.9.1a/8.9.1/CEAnet-relay-5.0.D20) with ESMTP id JAA05906; Wed, 15 Dec 1999 09:41:21 +0100 (MET) Received: from cea.fr (localhost [127.0.0.1]) by orion.serma.cea.fr (8.9.3/8.8.7) with ESMTP id JAA17339; Wed, 15 Dec 1999 09:41:18 +0100 Sender: weis Message-ID: <3857542E.2952CA97@cea.fr> Date: Wed, 15 Dec 1999 08:41:18 +0000 From: Patrick Goldbronn - SYSCO Organization: CEA X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.9-27mdksmp-fb i686) X-Accept-Language: fr-FR, en MIME-Version: 1.0 To: Jacques.Garrigue@inria.fr CC: skaller@maxtal.com.au, caml-list@inria.fr Subject: Re: Finalisation in 2.02 References: <3853189B.86E5EBFE@maxtal.com.au> <19991213103538V.garrigue@pauillac.inria.fr> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit Jacques Garrigue wrote: > > From: skaller > > > The problem is that when I create an object with alloc_final(_,_,0,1), > > the finaliser is not called on termination. Using 1,1 seems to cause > > it to be called almost immediately. > > The meaning of the two last parameters is a fraction giving the > maximum number of times allocation may be done before GC is > called. 0/1 means that the GC urgency count is not incremented, so > this may take an indefinite time. 1/1 means do GC on each allocation. > > As an example, in LablGtk all widgets allocations are finalized, with > a parameter 1/200. That is, the GC will be called at least every 200 > times I build a pointer to a GtkObject, so that I may not have more > than 200 stall pointers. This may need some more tuning, but the > number of pointers you create depends very much on your application. > What's append when we change the finalization parameters values ? We alloc an object of type toto with 1,200 and another object toto with 9,146 It's the last number which is keep by GC (here 146) and erase previous value (200) The same with the pound (1 and 9) or they are adding -> 1+9 = 10 < 146 ? Thanks, -- ##################################### # Patrick GOLDBRONN # # CEA - DRN/DMT/SYSCO # # CE-Saclay, Bâtiment 460 # # 91191 GIF/YVETTE CEDEX (FRANCE) # # # # Tél : 01 69 08 73 55 # # Fax : 01 69 08 96 96 # #####################################