Browse thread
Determining memory usage?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2005-02-14 (02:19) |
From: | Jon Harrop <jon@j...> |
Subject: | Re: [Caml-list] Determining memory usage? |
On Monday 14 February 2005 01:46, Erik de Castro Lopo wrote: > Remi Vanicat <remi.vanicat@gmail.com> 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.