<div dir="ltr"><p><span style="color:rgb(0,0,0)"> I was studying the Linux Kernel Source , and came across this doubt .<br></span></p><p><span style="color:rgb(0,0,0)">Does
Linux use all of the physical memory (RAM) I have ? In both the outputs
of /proc/meminfo and free -h , shows that 1.4 gigs is used and 1.6 gigs
is cached , and the rest is "free" out of 32 Gigs . The available ram
is the cached ram + reclaimable ram + free ram , right ?</span></p><p><span style="color:rgb(0,0,0)">I
went through the source code of /fs/proc/meminfo.c and it's polling ram
usage from the sysinfo struct , so I browsed through
/linux/include/uapi/Linux/sysinfo.h , over there freeram is available
memory size .</span></p><p><span style="color:rgb(0,0,0)">But again in meminfo.c , we are seeing MemFree as i.freeram ( here i is assigned to the structure of type sysinfo ) .</span></p><p><span style="color:rgb(0,0,0)">so is free ram = available memory ? But then , I have free ram of 27 Gi , and available memory of 28 Gi , why is that ?</span></p><p><span style="color:rgb(0,0,0)">And
also , does the linux kernel use the amount of ram which is not used by
applications as paging cache ? Say I have 4 gigs of ram , and Firefox
is using 1 gig of it , the rest of RAM is used for disk/page caching or is it just unused and left there ?</span></p><p><span style="color:rgb(0,0,0)">Thank you</span></p></div>