On Fri, 15 Jan 2016 13:41:54 +0100 Paolo Bonzini <pbonz...@redhat.com> wrote:
> Build the addresses and s/g lists on the stack, and then copy them > to a VirtQueueElement that is just as big as required to contain this > particular s/g list. The cost of the copy is minimal compared to that > of a large malloc. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > hw/virtio/dataplane/vring.c | 53 > ++++++++++++++++++++++++++++++--------------- > 1 file changed, 36 insertions(+), 17 deletions(-) Reviewed-by: Cornelia Huck <cornelia.h...@de.ibm.com>