
29 Jan
2004
29 Jan
'04
1:04 p.m.
Glynn Clements
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