From 52c456a522e1efd841fcbfe137c8ed24d81d9113 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 31 Jul 2008 12:38:32 +0100 Subject: [PATCH] hvm builder: Cleaner sp_extents allocation We do not need more than count elements in the sp_extents array. Signed-off-by: Samuel Thibault --- tools/libxc/xc_hvm_build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/xc_hvm_build.c b/tools/libxc/xc_hvm_build.c index a174b430a1..752c4e76dc 100644 --- a/tools/libxc/xc_hvm_build.c +++ b/tools/libxc/xc_hvm_build.c @@ -229,7 +229,7 @@ static int setup_guest(int xc_handle, if ( ((count | cur_pages) & (SUPERPAGE_NR_PFNS - 1)) == 0 ) { long done; - xen_pfn_t sp_extents[2048 >> SUPERPAGE_PFN_SHIFT]; + xen_pfn_t sp_extents[count >> SUPERPAGE_PFN_SHIFT]; struct xen_memory_reservation sp_req = { .nr_extents = count >> SUPERPAGE_PFN_SHIFT, .extent_order = SUPERPAGE_PFN_SHIFT, -- 2.30.2