is "shared memory" hardcoded to zero in gnome-system-monitor?



Hello,

I was reading libgtop code and noticed this snippet at sysdeps/linux/mem.c
https://git.gnome.org/browse/libgtop/tree/sysdeps/linux/mem.c#n58

--------------8<-----------------------
file_to_buffer(server, buffer, sizeof buffer, FILENAME);

buf->total  = get_scaled(buffer, "MemTotal:");
buf->free   = get_scaled(buffer, "MemFree:");
buf->used   = buf->total - buf->free;
buf->shared = 0;
buf->buffer = get_scaled(buffer, "Buffers:");
buf->cached = get_scaled(buffer, "Cached:");
--------------8<-----------------------

where FILENAME is /proc/meminfo.

Question:
why is buf->shared hardcoded to zero?
Is it intentional or a woops?

"man proc" is pretty vague about the "Shmem" field
of /proc/meminfo (it says "to be documented"),
which seems to be the candidate for filling buf->shared,
http://linux.die.net/man/5/proc

but I was suprised to discover that gnome-system-monitor
is wired to a flat constant zero (is it?) when it comes to show
the amount of shared memory.

Cheers,
GGhh


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