yandong han
2013-Jul-05 01:55 UTC
how to use void free_xenheap_pages(void *v, unsigned int order) ? what does the order mean?
hi, all I used alloc_xenheap_page() to allocate a page of memory, then I should free it. but I donnt know what the order mean? can anyone give me an example? comm->shared_page_ptr = alloc_xenheap_page(); comm->shared_page_mfn = virt_to_mfn(comm->shared_page_ptr); page = mfn_to_page(comm->shared_page_mfn); share_xen_page_with_privileged_guests(page, XENSHARE_writable); ---------------------------------------------------------- Best Regards, yandong _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Jan Beulich
2013-Jul-05 07:59 UTC
Re: how to use void free_xenheap_pages(void *v, unsigned int order) ? what does the order mean?
>>> On 05.07.13 at 03:55, yandong han <toyandong@gmail.com> wrote: > I used alloc_xenheap_page() to allocate a page of memory, then I > should free it. > but I donnt know what the order mean? can anyone give me an example?Before asking here, why don''t you do a little bit of research yourself? You obviously didn''t look at the "declaration" of alloc_xenheap_page(), or else you would have seen that this is a macro _and_ that there is also a matching free_xenheap_page(). Either of the two observations directly answers your question. And along the same lines (considering the usage example you gave), I can only recommend looking at how other existing code does this handling, in order for you to avoid making mistakes here. Jan