"Daniel P. Berrange" <berra...@redhat.com> wrote: > On Mon, Jul 17, 2017 at 03:42:32PM +0200, Juan Quintela wrote: >> We now send several pages at a time each time that we wakeup a thread. >> >> Signed-off-by: Juan Quintela <quint...@redhat.com> >> >> -- >> >> Use iovec's insead of creating the equivalent. >> --- >> migration/ram.c | 46 ++++++++++++++++++++++++++++++++++++++++------ >> 1 file changed, 40 insertions(+), 6 deletions(-) >> >> diff --git a/migration/ram.c b/migration/ram.c >> index 2bf3fa7..90e1bcb 100644 >> --- a/migration/ram.c >> +++ b/migration/ram.c > >> +static void multifd_init_group(multifd_pages_t *pages) >> +{ >> + pages->num = 0; >> + pages->size = migrate_multifd_group(); >> + pages->iov = g_malloc0(pages->size * sizeof(struct iovec)); > > Use g_new() so that it checks for overflow in the size calculation.
Done, thanks.