From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA16666 for caml-red; Fri, 12 Jan 2001 10:09:44 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA07318 for ; Thu, 11 Jan 2001 23:18:05 +0100 (MET) Received: from wally.eecs.harvard.edu (wally.eecs.harvard.edu [140.247.60.30]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f0BMI4T12221; Thu, 11 Jan 2001 23:18:04 +0100 (MET) Received: from labrador.eecs.harvard.edu (labrador.eecs.harvard.edu [140.247.60.247]) by wally.eecs.harvard.edu (8.10.0/8.10.0) with ESMTP id f0BMHvv31368; Thu, 11 Jan 2001 17:17:57 -0500 (EST) Message-Id: <200101112217.f0BMHvv31368@wally.eecs.harvard.edu> To: Xavier Leroy cc: caml-list@inria.fr Subject: Re: questions about costs of nativeint vs int In-Reply-To: Message from Xavier Leroy of "Thu, 11 Jan 2001 19:34:07 +0100." <20010111193407.A4332@pauillac.inria.fr> Date: Thu, 11 Jan 2001 17:17:59 -0500 From: Norman Ramsey Sender: weis@pauillac.inria.fr > Values of type "nativeint", "int32" and "int64" are boxed > (heap-allocated and handled through a pointer), while values of type > "int" are unboxed... > > > type loc = Cell of char * int * width > > | Slice of ... > > > > type loc' = Cell of char * nativeint * width > > | Slice of ... > > A "Cell" requires two more memory words in the latter case. Thanks for this very helpful reply. I think for simplicity, we may go with nativeint now. Another question: are there any tools that would enable us to track, e.g., how much memory is being occupied by instances of "Cell", or even just how many "Cells" might be live at a given moment? That way we could evaluate the potential savings in moving to int for some variants... Norman