Display System Memory on FreeBSD too

Authored by tcberner on Mar 22 2016, 9:17 PM.



Kinfocenter currently only calculates a value for Linux, behind a Q_OS_LINUX.
Extend this with a Q_OS_FREEBSD. The same code would probably also work on the other BSD-flavours.

Diff Detail

R102 KInfoCenter
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
tcberner updated this revision to Diff 2911.Mar 22 2016, 9:17 PM
tcberner retitled this revision from to Display System Memory on FreeBSD too.
tcberner updated this object.
tcberner edited the test plan for this revision. (Show Details)
tcberner added reviewers: sebas, rakuco.
tcberner set the repository for this revision to R102 KInfoCenter.
rakuco edited edge metadata.Mar 23 2016, 9:36 AM

How about using the same calls present in Modules/memory/memory_fbsd.cpp (basically read the contents of the hw.physmem sysctl)?

sebas accepted this revision.Mar 23 2016, 12:28 PM
sebas edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Mar 23 2016, 12:28 PM
tcberner updated this revision to Diff 2926.Mar 23 2016, 5:07 PM
tcberner edited edge metadata.
tcberner removed R102 KInfoCenter as the repository for this revision.

As rakuco suggested, use the same method as in memory_fbsd.cpp to read this value via hw.physmem.

This revision was automatically updated to reflect the committed changes.