I am shame to say that I have never met a function whose return value is void*. This is the first time~~~ So, can anyone told me the meaning of the return value of this function -----xc_map_foreign_range? Is it a pointer pointed to a memory area corresponding the machine frame number(the last parameter passed to the function)? And the third parameter named size: the unit of size is in bytes or in pages? Wish you good luck~~~ yours:Lin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Derek Murray
2008-Mar-18 12:33 UTC
Re: [Xen-devel] The return value of xc_map_foreign_range~~~
Hi, 2008/3/18 张琳 <zhanglin_nk@tom.com>:> So, can anyone told me the meaning of the return value of this function > -----xc_map_foreign_range? > > Is it a pointer pointed to a memory area corresponding the machine frame > number(the last parameter passed to the function)?That's correct.> And the third parameter named size: the unit of size is in bytes or in > pages?The size parameter is in bytes, and must be a multiple of PAGE_SIZE (as with mmap). Regards, Derek Murray. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Daniel Stodden
2008-Mar-18 12:49 UTC
Re: [Xen-devel] The return value of xc_map_foreign_range~~~
On Tue, 2008-03-18 at 19:45 +0800, 张琳 wrote:> I am shame to say that I have never met a function whose return value > is void*.To get used to it, I''d recommend malloc(). Just try it, it opens a whole world of new and exciting applications. ;) scnr. Best, Daniel -- Daniel Stodden LRR - Lehrstuhl für Rechnertechnik und Rechnerorganisation Institut für Informatik der TU München D-85748 Garching http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel