Review Request: KMemoryInfo: system memory query

John Tapsell johnflux at
Sun Jan 10 04:04:16 GMT 2010

2010/1/10 Sebastian K├╝gler <sebas at>:
> 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()


More information about the kde-core-devel mailing list