[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] domain builder: Fix sp_extents allocation
On 31/7/08 12:29, "Samuel Thibault" <samuel.thibault@xxxxxxxxxxxxx> wrote: > Keir Fraser, le Thu 31 Jul 2008 12:19:18 +0100, a écrit : >> Doesn't this turn the array allocation into a dynamic allocation? I feel a >> bit dubious about that. > >>> { >>> 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 = { > > Err, I'd think that it just turns a > > sub (2048>>SUPERPAGE_PFN_SHIFT) * sizeof(xen_pfn_t), %esp > > into a > > mov count, %eax > shr SUPERPAGE_PFN_SHIFT - log2(sizeof(xen_pfn_t)), %eax > sub %eax, %esp Yes, good point! -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |