Andrew Brunner wrote:
This was tested on Ubuntu x64 10.04
64bit AMD with 3Gigs of RAM
Linux.SysInfo(@SI);
Load_Ram:=(100-Trunc(100 * SI.freeram / SI.totalram));
Si.totalram checks out ok. SI.freeram never seems to be accurate.
The numbers returned here do not correspond to that of System Monitor
for the same user.
When using sudo ./startlazarus and debugging process (I'm debugging
project that requires low port numbers) the numbers are even more off.
What is the problem with Linux? Windows GlobalMemoryStatus works just fine.
This function is essential for server management and trouble shooting.
Are the numbers returned by SysInfo() similar to those returned by
Linux's 'free' program and 'top'? Are you taking into account that your
program, and in particular the Lazarus IDE, are going to be reducing the
amount of free memory significantly?
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel