Vijay Venkata <vijay.venkata@inet.com> writes: > Hi > > Would somebody be kind enough to give me some pointers on the > availability of some linux kernel call that I can use to get the > amount of physical memory available on the system ? > > I am trying to do something like this (not using bigphyspatch but > reserving memory at boot time, pg 403 on O'Reilly book) > > dmabuf = ioremap (getAvailablePhysicalMemory (), 0x100000 /*1M*/); > > Any help would be greatly appreciated. The /proc/meminfo interface .... ecashin@meili ecashin$ grep MemTotal /proc/meminfo MemTotal: 257128 kB ... implemented in fs/proc/proc_misc.c by meminfo_read_proc, uses si_meminfo to get that information. (at least in 2.4.18) -- --Ed L Cashin PGP public key: http://noserose.net/e/pgp/ -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/