[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 4/4] xen: Avoid VLA
> -----Original Message----- > From: Anthony PERARD [mailto:anthony.perard@xxxxxxxxxx] > Sent: 17 June 2019 18:37 > To: Paul Durrant <Paul.Durrant@xxxxxxxxxx> > Cc: qemu-devel@xxxxxxxxxx; xen-devel@xxxxxxxxxxxxxxxxxxxx; Stefano Stabellini > <sstabellini@xxxxxxxxxx> > Subject: Re: [PATCH 4/4] xen: Avoid VLA > > On Mon, Jun 17, 2019 at 05:39:09PM +0100, Paul Durrant wrote: > > > @@ -632,6 +633,8 @@ static void xen_sync_dirty_bitmap(XenIOState *state, > > > return; > > > } > > > > > > + bitmap = g_new0(unsigned long, bitmap_size); > > > + > > > > How hot is this function? It looks (unsurprisingly) like the section > > size determines the map size so I wonder whether it can instead be > > allocated once when the section is added? > > I think we can store the bitmap buffer into the `state' where > `log_for_dirtybit' is already present, and free the bitmap when > `log_for_dirtybit' is cleared. That sounds better :-) Cheers, Paul > > Thanks, > > -- > Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |