[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] domain builder: make mmap() failure message more verbose.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1196763184 0 # Node ID 6e7cf648f7f3486e532be332bb4d832bbfe9784a # Parent 01faea565a9b24c819a25fdcf444cd65fc1932f2 domain builder: make mmap() failure message more verbose. Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx> --- tools/libxc/xc_dom_core.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff -r 01faea565a9b -r 6e7cf648f7f3 tools/libxc/xc_dom_core.c --- a/tools/libxc/xc_dom_core.c Tue Dec 04 10:11:54 2007 +0000 +++ b/tools/libxc/xc_dom_core.c Tue Dec 04 10:13:04 2007 +0000 @@ -352,15 +352,19 @@ void *xc_dom_pfn_to_ptr(struct xc_dom_im } else { + int err; + mode = "anonymous memory"; phys->ptr = mmap(NULL, phys->count << page_shift, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); if ( phys->ptr == MAP_FAILED ) { + err = errno; xc_dom_panic(XC_OUT_OF_MEMORY, - "%s: oom: can't allocate 0x%" PRIpfn " pages\n", - __FUNCTION__, count); + "%s: oom: can't allocate 0x%" PRIpfn " pages" + " [mmap, errno=%i (%s)]\n", + __FUNCTION__, count, err, strerror(err)); return NULL; } dom->alloc_mem_map += phys->count << page_shift; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |