detecting memory size?
Ketil Malde
ketil+haskell at ii.uib.no
Thu Jan 29 14:04:04 EST 2004
Glynn Clements <glynn.clements at virgin.net> writes:
> IIRC, getrlimit(RLIMIT_DATA) doesn't mean much on Linux, as it doesn't
> include memory which is added using mmap(..., MAP_ANON), which is used
> by glibc's malloc(). Also, getrlimit(RLIMIT_RSS) is probably more
> relevant for your purposes.
I also got a reply from David Roundy (the author of darcs); he is
using sysconf(3), which apparently is fairly portable, and suffices to
at least obtain the amount of physical memory.
-kzm
--
If I haven't seen further, it is by standing in the footprints of giants
More information about the Glasgow-haskell-users
mailing list