
On Tue, Nov 06, 2012 at 05:47:41PM +0800, Gao feng wrote:
于 2012年11月06日 17:04, Richard W.M. Jones 写道:
On Tue, Nov 06, 2012 at 02:07:21PM +0800, Gao feng wrote:
+ unsigned long long meminfo[VIR_LXC_FUSE_MEMMAX]; +enum { + VIR_LXC_FUSE_MEMTOTAL, + VIR_LXC_FUSE_MEMUSAGE, + VIR_LXC_FUSE_CACHED, + VIR_LXC_FUSE_ACTIVE_ANON, + VIR_LXC_FUSE_INACTIVE_ANON, + VIR_LXC_FUSE_ACTIVE_FILE, + VIR_LXC_FUSE_INACTIVE_FILE, + VIR_LXC_FUSE_UNEVICTABLE, + VIR_LXC_FUSE_SWAPTOTAL, + VIR_LXC_FUSE_SWAPUSAGE, + VIR_LXC_FUSE_MEMMAX, +};
Any particular reason not to use a struct here?
Rich.
Sorry,can you show me the example? I don't know why we need struct here.
It's not needed, but I was wondering why you didn't use a struct like: struct virLXCMeminfo { unsigned long long memtotal; unsigned long long memusage; // etc }; typedef struct virLXCMeminfo *virLXCMeminfoPtr; Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw