From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p5DCY4Tr020931 for ; Mon, 13 Jun 2011 14:34:05 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjsDAFgD9k3DumTngWdsb2JhbABSpkoBARYmJYhyvy4OhhYElgOLEA X-IronPort-AV: E=Sophos;i="4.65,358,1304287200"; d="scan'208";a="101172907" Received: from nwas13.bluewin.ch (HELO zhbdzmsp-nwas13.bluewin.ch) ([195.186.100.231]) by mail4-smtp-sop.national.inria.fr with ESMTP; 13 Jun 2011 14:34:00 +0200 Received: from [83.76.55.36] ([83.76.55.36:50150] helo=seldon) by zhbdzmsp-nwas13.bluewin.ch (envelope-from ) (ecelerity 2.2.2.45 r()) with ESMTP id A6/BB-01173-4B306FD4; Mon, 13 Jun 2011 12:34:00 +0000 Received: from yziquel by seldon with local (Exim 4.72) (envelope-from ) id 1QW6EG-0003vh-T1; Mon, 13 Jun 2011 14:26:52 +0200 Date: Mon, 13 Jun 2011 14:26:52 +0200 From: Guillaume Yziquel To: Gerd Stolpmann Cc: Yoonseok Ko , caml-list@inria.fr Message-ID: <20110613122652.GB637@localhost> References: <4DF55B5D.9090302@ropas.snu.ac.kr> <1307967660.16462.49.camel@gps-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1307967660.16462.49.camel@gps-desktop> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [Caml-list] A question about GC. Le Monday 13 Jun 2011 à 14:21:00 (+0200), Gerd Stolpmann a écrit : > > Your problem sounds a bit like as if the custom blocks were allocated > with the wrong parameters. Remember caml_alloc_custom has four > parameters: > > caml_alloc_custom(ops, size, used, max) > > Often one sets here used=0 and max=1, but this may be totally wrong if > you allocate larger blocks. muddy.c does exactly that. However, I have no idea about the size of the blocks or data pointed to by the block. > Better set used=1, and max is the number of > custom block allocations until the major GC is triggered. (Imagine there > is a water level variable w, and for every allocation w:=w+used/max, and > if w exceeds 1.0 the water tank is full, and another major GC is > triggered.) > > Maybe this helps. > > Gerd -- Guillaume Yziquel