I am trying to access High Memory and High Free Memory so that i can pick up what are the available percentage of user memory space.
When i try the sysinfo API, i get accurate information for the total RAM and total free RAM. i.e.
if(sysinfo(&l_sys_info) == 0)
{
//Print Different Fields here
return;
}
The fields
unsigned long totalhigh; /* Total high memory size */
unsigned long freehigh; /* Available high memory size */
are always 0.
The documentation for sysinfo is here: http://man7.org/linux/man-pages/man2/sysinfo.2.html
So i tried to read the same values from the proc/meminfo file and i can't find the fields:
HighTotal:
HighFree: Highmem is all memory above ~860MB of physical memory Highmem areas are for use by userspace programs, or for the pagecache. The kernel must use tricks to access this memory, making it slower to access than lowmem.
The documentation of proc/meminfo can be found here http://man7.org/linux/man-pages/man5/proc.5.html
Are these fields absent in certain Kernel Versions? or certain flavors?
I got the same result for Linux Kernel Versions 3.0.38 and 2.6.32-55.