[lkml]   [2001]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 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.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:13    [W:0.080 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site