[mythtv] hdtvrecorder: dynamic ringbuffers?
Tom Hughes
tom at compton.nu
Wed Dec 22 16:41:21 UTC 2004
In message <41C99A1F.6000505 at BlueSkyTours.com>
John Patrick Poet <john at BlueSkyTours.com> wrote:
> Do you know how to detect the amount of physical RAM in the system?
On linux you do this:
sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGE_SIZE)
You might want to do that in a 64 bit integer or it may overflow
if you have an awful lot of memory ;-)
Most unixes will be able to do that although the names of the
constants given to sysconf sometimes vary a bit and some may not
have it at all. There is usually some way to do it though.
Tom
--
Tom Hughes (tom at compton.nu)
http://www.compton.nu/
More information about the mythtv-dev
mailing list