|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libxc: refactor memory allocation functions
On Tue, 2015-12-01 at 12:45 +0100, Juergen Gross wrote:
> On 01/12/15 12:39, Wei Liu wrote:
> > There were some problems with the original memory allocation functions:
> > 1. xc_dom_alloc_segment and xc_dom_alloc_pad ended up calling
> > ÂÂÂxc_dom_chk_alloc_pages while xc_dom_alloc_page open-coded
> > everything.
> > 2. xc_dom_alloc_pad didn't call dom->allocate.
> >
> > Refactor the code so that:
> > 1. xc_dom_alloc_{segment,pad,page} end up calling
> > ÂÂÂxc_dom_chk_alloc_pages.
> > 2. xc_dom_chk_alloc_pages calls dom->allocate.
> >
> > This way we avoid scattering dom->allocate over multiple locations and
> > open-coding.
> >
> > Also change the return type of xc_dom_alloc_page to xen_pfn_t and
> > return
> > an invalid pfn when xc_dom_chk_alloc_pages fails.
> >
> > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
>
> Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
Applied, thanks.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |