[libvirt] Inconsistency with documentation virDomainGetMaxMemory(NULL)

Stefan de Konink skinkie at xs4all.nl
Sat Jul 19 13:09:46 UTC 2008


Stefan de Konink schreef:
>  From docs:
> 
> Retrieve the maximum amount of physical memory allocated to a domain. If 
> domain is NULL, then this get the amount of memory reserved to Domain0 
> i.e. the domain where the application runs.

Doing it the 'proper' way gives an even more interesting answer:

     virDomainPtr domu = virDomainLookupByID(conn, 0);
     printf("%ld\n", virDomainGetMaxMemory(domu));


17179869180


Now...

MemTotal:      7990272 kB
MemFree:       7527312 kB
Buffers:         44400 kB
Cached:          50440 kB
SwapCached:          0 kB
Active:         133236 kB
Inactive:        63764 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:             476 kB
Writeback:           0 kB
AnonPages:      102216 kB
Mapped:          10848 kB
Slab:            20428 kB
SReclaimable:     7800 kB
SUnreclaim:      12628 kB
PageTables:       2648 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:   3995136 kB
Committed_AS:   568940 kB
VmallocTotal: 34359738367 kB
VmallocUsed:       412 kB
VmallocChunk: 34359737775 kB

That doesn't make sense.


Stefan




More information about the libvir-list mailing list