[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] xl: free bitmaps on exit
On Tue, Nov 27, 2018 at 06:09:33PM +0100, Olaf Hering wrote: > Am Tue, 27 Nov 2018 16:55:38 +0000 > schrieb Wei Liu <wei.liu2@xxxxxxxxxx>: > > > Looking more closely into this, these lines should be moved even > > earlier before the call to libxl_ctx_alloc -- there is an exit there. > > Is it required to install the atexit handler before alloc()? > To me it looks like atexit(xl_ctx_free) should be done right after, or > inside, xl_ctx_alloc(). Note that multiple calls to atexit creates a chain of functions to call, not overriding what is previously registered. The xl_ctx_alloc function is also called in postfork. I think if you move atexit call into xl_ctx_alloc you will end up registering xl_ctx_free more than once, which is wrong. The other option -- to call atexit right after -- looks plausible to me. Wei. > > Olaf _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |