This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] sysinfo


On Fri, 2011-05-06 at 10:11 +0200, Corinna Vinschen wrote:
> On May  6 00:09, Yaakov (Cygwin/X) wrote:
> > This implements sysinfo(2), a GNU extension:
> > 
> > http://www.kernel.org/doc/man-pages/online/pages/man2/sysinfo.2.html
> > 
> > The code is partially based on our /proc/meminfo and /proc/uptime code.
> > (My next patch will port the former to use sysinfo(2), but the latter
> > cannot as it uses .01s resolution, more than sysinfo's 1s.  That patch
> > will also fix /proc/meminfo and /proc/swaps for RAM and paging files
> > larger than 4GB.)
> > 
> > Patches for winsup/cygwin and winsup/doc, plus a test program, attached.
> > 
> > 
> > Yaakov
> > 
> 
> > 2011-05-05  Yaakov Selkowitz  <yselkowitz@...>
> > 
> > 	* sysconf.cc (sysinfo): New function.
> > 	* cygwin.din (sysinfo): Export.
> > 	* posix.sgml (std-gnu): Add sysinfo.
> > 	* include/sys/sysinfo.h (struct sysinfo): Define.
> > 	(sysinfo): Declare.
> > 	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
> 
> That looks good to me.  Just a question...
> 
> > +  /* FIXME: unsupported */
> > +  info->loads[0] = 0UL;
> > +  info->loads[1] = 0UL;
> > +  info->loads[2] = 0UL;
> > +  info->sharedram = 0UL;
> > +  info->bufferram = 0UL;
> 
> Isn't bufferram the sum of paged and non-paged pool?

The comment alongside the bufferram member of struct sysinfo, as defined
in the manpage above, says "Memory used by buffers".  A similar meaning
is given for the Buffers: line of Linux's /proc/meminfo:

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-proc-meminfo.html

So IIUC, no.


Yaakov



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]