From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 2C6ECBB84 for ; Mon, 12 Jan 2009 09:39:16 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvcIADaQaklQRFuwX2dsb2JhbACUBhcLCgQUvUeFbw X-IronPort-AV: E=Sophos;i="4.37,252,1231110000"; d="scan'208";a="19456366" Received: from furbychan.cocan.org ([80.68.91.176]) by mail2-smtp-roc.national.inria.fr with ESMTP; 12 Jan 2009 09:39:16 +0100 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1LMIKH-0007M8-Oc; Mon, 12 Jan 2009 08:39:13 +0000 Date: Mon, 12 Jan 2009 08:39:13 +0000 To: John Lepikhin Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] memory usage Message-ID: <20090112083913.GA28059@annexia.org> References: <1231746106.4376.27.camel@john-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1231746106.4376.27.camel@john-laptop> User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; eprintf:01 byte:01 chunks:01 pointer:01 2009:98 garbage:01 wrote:01 caml-list:01 roots:02 let:03 let:03 reachable:05 problem:05 somewhere:06 red:92 On Mon, Jan 12, 2009 at 03:41:46PM +0800, John Lepikhin wrote: > Please, give me some start point to find the roots of the problem. Starting point should be to call this periodically: Gc.compact (); let stat = Gc.stat () in let live_words = stat.Gc.live_words in eprintf "live words %d\n%!" live_words; which will tell you how many words (ie 4 or 8 byte chunks) are reachable according to the garbage collector. If this number is going up, then somewhere you are holding a pointer to some object that you didn't expect to be live. Rich. -- Richard Jones Red Hat