Re: [Haskell-cafe] Getting used and available memory

2010-04-28 Thread Mads Lindstrøm
Hi On Tue, 2010-04-27 at 14:55 -0700, Don Stewart wrote: We could bind to Rts.c in the GHC runtime, and get all the stats programmatically that you can get with +RTS -s That would be nice. /Mads ___ Haskell-Cafe mailing list

[Haskell-cafe] Getting used and available memory

2010-04-27 Thread Mads Lindstrøm
Hi I have tried haskell.org, Google and Hoolge, but I cannot find any function to give me the available and/or used memory of a Haskell program. Is it just not there? Or am I missing it somehow? /Mads ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Getting used and available memory

2010-04-27 Thread Daniel Peebles
It's not an easy measurement to even define. There was a huge debacle recently about a windows program that reported misleading numbers about used memory. The fact that GHC has its own allocator and hogs OS memory (it never returns it to the OS) might complicate the definition further. But in

Re: [Haskell-cafe] Getting used and available memory

2010-04-27 Thread Mads Lindstrøm
Hi I was _not_ looking for the OS-level measure, but rather something reported by the run-time. Thanks you for the answer anyway. /Mads On Tue, 2010-04-27 at 15:32 -0400, Daniel Peebles wrote: It's not an easy measurement to even define. There was a huge debacle recently about a windows

Re: [Haskell-cafe] Getting used and available memory

2010-04-27 Thread Don Stewart
We could bind to Rts.c in the GHC runtime, and get all the stats programmatically that you can get with +RTS -s mads.lindstroem: Hi I was _not_ looking for the OS-level measure, but rather something reported by the run-time. Thanks you for the answer anyway. /Mads On Tue, 2010-04-27 at

Re: [Haskell-cafe] Getting used and available memory

2010-04-27 Thread Bernie Pope
On 27 April 2010 17:55, Don Stewart d...@galois.com wrote: We could bind to Rts.c in the GHC runtime, and get all the stats programmatically that you can get with +RTS -s A long time ago I made a simple binding which has been packaged for cabal by Gwern Branwen. The package is called