Re: [Nautilus-list] RAM size formula ?



On 21 Mar 2002, Glen Gray wrote:

> OK, currently using a KB reading from /proc/meminfo#MemTotal the code
> does the following to work out your RAM
> 
> (size_kb + 500) / 1000
> 
> Whats the recommended way (if any) to work out total ram on a linux box

What value does not include the memory used by the kernel.

E.g. My machine says:
Mar 18 12:31:24 mjc kernel: Memory: 251824k/261752k available (1970k kernel code, 7620k reserved, 109k data, 244k init, 0k highmem)

I think the easiest (if a bit lame) way is to round the size to the 
nearest power of two megabytes.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a leather-clad Amish boxer on the edge. She's a foxy punk hooker with 
only herself to blame. They fight crime! 





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]