[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 08/24] xen/arm: Allow virq != irq
On Fri, 2015-02-27 at 14:33 +0000, Julien Grall wrote: > Hi Ian, > > On 20/02/15 17:09, Julien Grall wrote: > > On 20/02/15 15:52, Ian Campbell wrote: > >>> > >>> action = xmalloc(struct irqaction); > >>> - if (!action) > >>> + if ( !action ) > >>> + return -ENOMEM; > >>> + > >>> + info = xmalloc(struct irq_guest); > >> > >> FWIW you might (subject to sizing/alignment needs) be able to do > >> action = _xmalloc(sizeof(struct irqaction) + sizeof(struct irq_guest); > >> info = (sturct irq_guest *)(action + 1); > >> > >> which would save some memory overhead for free pointers etc and allow > >> you to avoid manually managing the info. > >> > >> You probably won't like that though, so feel free to ignore. > > > > Actually it's a good idea :). I haven't though about it. > > I though about it. The pointer to irq_guest may not be correctly aligned > with this solution, right? It depends on sizeof(struct irqaction) (which is what I meant by "subject to..."). t'd probably need a ROUNDUP(sizeof(foo), pointer-alignement) in there somewhere. > So I prefer to keep separate the allocation. We can revisit it later. OK. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |