Messages in this thread |  | | Date | Mon, 12 Feb 2001 12:46:46 +0000 (GMT) | From | Tigran Aivazian <> | Subject | Re: sysinfo.sharedram not accounted for on i386 ? |
| |
On Mon, 12 Feb 2001, Brian Grossman wrote: > > Yes. > > Thanks. Is there a preferred way of getting the equivalent info > as free(1) did under 2.2?
btw, this is not only x86 behaviour but is also true on all other architectures. I.e. Linux defines "shared memory" as a "integer constant with value 0". So, to say "zero" is just a shorter form of saying "Linux concept of shared memory". However, remember that if you are interested in shared _pages_, that information is available and is not identically 0. See the show_mem() function in arch/i386/mm/init.c.
> > I've written a script to derive it from /proc/[0-9]*/statm, but that seems > like an awkward approach. A related question: is the page size stored in > /proc somewhere?
No, PAGE_SIZE is known at compile time and cannot ever change (especially it cannot change ig you stay within i386 architecture). It is available to programs by including <asm/page.h> header.
Tigran
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |