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.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr 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 E5EBFBBAF for ; Thu, 24 Jul 2008 18:12:21 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAHNGiEjAXQIn/2dsb2JhbACxOA X-IronPort-AV: E=Sophos;i="4.31,247,1215381600"; d="scan'208";a="13422461" Received: from concorde.inria.fr ([192.93.2.39]) by mail2-smtp-roc.national.inria.fr with ESMTP; 24 Jul 2008 18:12:21 +0200 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m6OGCJof014964 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 24 Jul 2008 18:12:21 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuEEAHNGiEhQDPIbX2dsb2JhbACSShwCBAgQBZ4v X-IronPort-AV: E=Sophos;i="4.31,247,1215381600"; d="scan'208";a="15425977" Received: from smtp20.orange.fr ([80.12.242.27]) by mail3-smtp-sop.national.inria.fr with ESMTP; 24 Jul 2008 18:12:19 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2009.orange.fr (SMTP Server) with ESMTP id 7C49B1C000C8; Thu, 24 Jul 2008 18:12:18 +0200 (CEST) Received: from [192.168.1.66] (APuteaux-154-1-59-95.w81-249.abo.wanadoo.fr [81.249.66.95]) by mwinf2009.orange.fr (SMTP Server) with ESMTP id 225421C0009E; Thu, 24 Jul 2008 18:12:18 +0200 (CEST) X-ME-UUID: 20080724161218140.225421C0009E@mwinf2009.orange.fr Message-ID: <4888A9DE.5060706@frisch.fr> Date: Thu, 24 Jul 2008 18:12:14 +0200 From: Alain Frisch User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: "Dr. Thomas Fischbacher" Cc: dmitry grebeniuk , "caml-list@inria.fr" Subject: Re: [Caml-list] Memory statistics tool References: <48870DD8.4050906@soton.ac.uk> <1497034692.20080723154431@moldavcable.com> <48872D6E.20209@soton.ac.uk> <48872F38.30609@frisch.fr> <48887A16.1070906@soton.ac.uk> <48889C59.8080806@frisch.fr> <4888A37A.5090407@soton.ac.uk> In-Reply-To: <4888A37A.5090407@soton.ac.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4888A9E3.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; frisch:01 frisch:01 ocaml:01 hashtbl:01 hash:01 hashtbl:01 hash:01 wrote:01 caml-list:01 alain:01 alain:01 objects:02 objects:02 cons:04 cons:04 Dr. Thomas Fischbacher wrote: > The OCaml manual gives no guarantee that Hashtbl.hash does not cons, so > I cannot assume this. Indeed, Hashtbl.hash can cons, but this does not contradict my point: its result does not depend on the physical location of objects in memory (if it did, it would be impossible to use this function at all). > Now, without that guarantee, there is a nasty race > condition in which the determination of the hash bucket causes objects > to move in memory. Yes, objects can move in memory, but what is wrong with that? Their new hash value will remain the same. -- Alain