Review Request: KMemoryInfo: system memory query
John Tapsell
johnflux at gmail.com
Sun Jan 10 04:04:16 GMT 2010
2010/1/10 Sebastian Kügler <sebas at kde.org>:
> On Sunday 10 January 2010 00:18:47 Pino Toscano wrote:
>> KMemoryInfo is a small class used to query the OS requesting the memory
>> (RAM) information available. It is possible to selectively choose which
>> information request.
At a quick glance, it looks like you're returning the values in bytes?
The documentation doesn't say what the units are anywhere.
I think returning the values in kilobytes is better.
For the linux implementation you use the sysinfo function. Any idea
how this compares, speed wise, to sysconf?
E.g. doing:
return ((long long)sysconf(_SC_PHYS_PAGES)) * (sysconf(_SC_PAGESIZE)/1024);
etc. This also avoids the need for an update()
John
More information about the kde-core-devel
mailing list