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=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id E3E58BBAF for ; Wed, 23 Jul 2008 15:09:28 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAMTKhkjAXQIm/2dsb2JhbACyUA X-IronPort-AV: E=Sophos;i="4.31,238,1215381600"; d="scan'208";a="15419673" Received: from discorde.inria.fr ([192.93.2.38]) by mail1-smtp-roc.national.inria.fr with ESMTP; 23 Jul 2008 15:09:20 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m6ND9KvA014669 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Wed, 23 Jul 2008 15:09:20 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhIDAEvKhkiYToBqc2dsb2JhbACSTgEMAgsHEQWfSQ X-IronPort-AV: E=Sophos;i="4.31,238,1215381600"; d="scan'208";a="27605880" Received: from mailgate5.iss.soton.ac.uk ([152.78.128.106]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 23 Jul 2008 15:09:20 +0200 Received: from [152.78.96.56] (alpha.kk.soton.ac.uk [152.78.96.56]) (authenticated bits=0) by mailgate5.iss.soton.ac.uk (8.13.8/8.13.4) with ESMTP id m6ND92LW013601 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Jul 2008 14:09:07 +0100 Message-ID: <48872D6E.20209@soton.ac.uk> Date: Wed, 23 Jul 2008 14:09:02 +0100 From: "Dr. Thomas Fischbacher" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060607 Debian/1.7.12-1.2 X-Accept-Language: en MIME-Version: 1.0 To: dmitry grebeniuk Cc: "caml-list@inria.fr" Subject: Re: [Caml-list] Memory statistics tool References: <48870DD8.4050906@soton.ac.uk> <1497034692.20080723154431@moldavcable.com> In-Reply-To: <1497034692.20080723154431@moldavcable.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (mailgate5.iss.soton.ac.uk [152.78.128.106]); Wed, 23 Jul 2008 14:09:09 +0100 (BST) X-ISS-MailScanner-Information: Please contact Serviceline@soton.ac.uk for more information X-ISS-MailScanner: Found to be clean X-ISS-MailScanner-SpamCheck: X-Miltered: at discorde with ID 48872D80.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; grebeniuk:01 ocaml:01 compaction:01 ocaml:01 hash:01 wrote:01 heap:01 dmitry:01 caml-list:01 int:01 lisp:02 traversal:03 seems:03 float:03 problem:05 dmitry grebeniuk wrote: > DTF> memory_footprint: 'a -> int64 (or maybe float), > > objsize, now hosted on OCaml forge: > http://forge.ocamlcore.org/projects/objsize/ Many thanks! I just had a glance at it, but it seems to be just how one would have to approach such a problem. (The issue with hash-based approaches to find previously visited substructures is that during traversal, a GC may occur. Now I just assume that this may involve relocation and heap compaction in OCaml. The problem then is that OCaml does not properly support what would be known as eq hash tables in Lisp.) -- best regards, Thomas Fischbacher t.fischbacher@soton.ac.uk