From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id CBC86BC8B for ; Mon, 14 Feb 2005 03:19:13 +0100 (CET) Received: from ptb-relay02.plus.net (ptb-relay02.plus.net [212.159.14.213]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1E2JDll023149 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 14 Feb 2005 03:19:13 +0100 Received: from [80.229.56.224] (helo=chetara) by ptb-relay02.plus.net with esmtp (Exim) id 1D0VpQ-0000P2-OC for caml-list@yquem.inria.fr; Mon, 14 Feb 2005 02:19:12 +0000 From: Jon Harrop Organization: University of Cambridge To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Determining memory usage? Date: Mon, 14 Feb 2005 02:20:50 +0000 User-Agent: KMail/1.7.1 References: <20050213132939.03ea86d1.ocaml-erikd@mega-nerd.com> <6b8a9142050213003195ddb28@mail.gmail.com> <20050214124650.69921c71.ocaml-erikd@mega-nerd.com> In-Reply-To: <20050214124650.69921c71.ocaml-erikd@mega-nerd.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200502140220.51095.jon@jdh30.plus.com> X-Miltered: at nez-perce with ID 42100AA1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 wrote:01 wrote:01 stdlib:01 heap:01 46,:98 frog:98 remi:01 remi:01 vanicat:02 vanicat:02 caml:02 seems:03 module:03 bytes:03 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Monday 14 February 2005 01:46, Erik de Castro Lopo wrote: > Remi Vanicat wrote: > > Then you have to look to the Gc module of the stdlib, in particular > > the Gc.stat function > > Thanks Remi, the heap_words field of the stat record seems to be > what I want. However sicne that field is in words, I'm looking > for a way to figure out the word_size (4 vs 8 bytes) so I can > do a calculation that is correct on 32 and 64 but systems. > > Any further clues? You'll be wanting Sys.word_size: "Size of one word on the machine currently executing the Caml program, in bits: 32 or 64." :-) -- Dr Jon D Harrop, Flying Frog Consultancy Ltd.