Tan, Lin
2008-Jan-25 18:11 UTC
[Xen-devel] free_xen_event_channel() forgets to free the channel or it is obsolete?
Hi, Should free_xen_event_channel() actually free the event_channel, by calling free_xen_event_channel() and then xfree()? Right now, it only closes the channel. Or free_xen_event_channel() is not used at all and should be removed, as evtchn_destroy() does the same job? It is in file common/event_channel.c. Thanks, Lin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tan, Lin
2008-Jan-26 01:57 UTC
[Xen-devel] free_xen_event_channel() forgets to free the channel or it is obsolete?
Hi, Should free_xen_event_channel() actually free the event_channel, by calling free_xen_event_channel() and then xfree()? Right now, it only closes the channel. Or free_xen_event_channel() is not used at all and should be removed, as evtchn_destroy() does the same job? It is in file common/event_channel.c. Thanks, Lin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tan, Lin
2008-Jan-27 02:48 UTC
[Xen-devel] free_xen_event_channel() forgets to free the channel or it is obsolete?
Hi, Should free_xen_event_channel() actually free the event_channel, by calling free_xen_event_channel() and then xfree()? Right now, it only closes the channel. Or free_xen_event_channel() is not used at all and should be removed, as evtchn_destroy() does the same job? It is in file common/event_channel.c. Thanks, Lin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Jan-27 09:45 UTC
Re: [Xen-devel] free_xen_event_channel() forgets to free the channel or it is obsolete?
It is called free_xen_event_channel() as the symmetric opposite of alloc_unbound_xen_event_channel(). Since the latter does no xmalloc(), it makes sense the former would do no xfree(). -- Keir On 27/1/08 02:48, "Tan, Lin" <lintan2@uiuc.edu> wrote:> Hi, > > Should free_xen_event_channel() actually free the event_channel, by calling > free_xen_event_channel() and then xfree()? Right now, it only closes the > channel. > > Or free_xen_event_channel() is not used at all and should be removed, as > evtchn_destroy() does the same job? > > It is in file common/event_channel.c. > > Thanks, > Lin > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Lin Tan
2008-Jan-27 16:06 UTC
Re: [Xen-devel] free_xen_event_channel() forgets to free the channel or it is obsolete?
Thanks a lot for the explanation! I was confused by the name free. Lin On Jan 27, 2008, at 3:45 AM, Keir Fraser wrote:> It is called free_xen_event_channel() as the symmetric opposite of > alloc_unbound_xen_event_channel(). Since the latter does no xmalloc > (), it > makes sense the former would do no xfree(). > > -- Keir > > On 27/1/08 02:48, "Tan, Lin" <lintan2@uiuc.edu> wrote: > >> Hi, >> >> Should free_xen_event_channel() actually free the event_channel, >> by calling >> free_xen_event_channel() and then xfree()? Right now, it only >> closes the >> channel. >> >> Or free_xen_event_channel() is not used at all and should be >> removed, as >> evtchn_destroy() does the same job? >> >> It is in file common/event_channel.c. >> >> Thanks, >> Lin >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel