[PATCH] Fix /proc/meminfo and /proc/swaps for >4GB

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Thu May 12 03:58:00 GMT 2011


On Mon, 2011-05-09 at 09:55 +0200, Corinna Vinschen wrote:
> I'm not sure I understand this new format.  Why do you keep the Mem: and
> Swap: lines?  Linux doesn't have them and top appears to work without
> them.  And then, why do you print MemShared, HighTotal, and HighFree,
> even though they are always 0, but not all the other ~40 lines Linux'
> meminfo has, too?

Actually, my patch makes no attempt to change the actual format
of /proc/meminfo; it changes only what is necessary to handle RAM or
swap larger than 4GB by using ULLs instead of ULs.

As for modernizing/fixing the format, true, the Mem: and Swap: lines do
not exist in modern Linux, nor does the MemShared: line.  I would like
to actually define at least HighTotal and HighFree; I'll try to look
into that further soon.  As for the rest of Linux's /proc/meminfo, I'll
have to see how many other lines can be reasonably determined (if they
would exist at all) on Windows.

So with the ULL changes, if I remove the Mem, Swap, and MemShared lines,
will that do for now?


Yaakov




More information about the Cygwin-patches mailing list