Re: [Qemu-devel] [PATCH 7/8] Don't abort on memory allocation error

2014-02-04 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> From: Orit Wasserman > >> if (!it->it_data) { >> cache->num_items++; >> +it->it_data = g_try_malloc(cache->page_size); >> +if (!it->it_data) { >> +DPRINTF("Error allocating

Re: [Qemu-devel] [PATCH 7/8] Don't abort on memory allocation error

2014-02-04 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > From: Orit Wasserman > if (!it->it_data) { > cache->num_items++; > +it->it_data = g_try_malloc(cache->page_size); > +if (!it->it_data) { > +DPRINTF("Error allocating page\n"); > +return -1; > +

[Qemu-devel] [PATCH 7/8] Don't abort on memory allocation error

2014-02-04 Thread Juan Quintela
From: Orit Wasserman It is better to fail migration in case of failure to allocate new cache item Signed-off-by: Orit Wasserman Signed-off-by: Juan Quintela --- arch_init.c| 4 +++- include/migration/page_cache.h | 4 +++- page_cache.c | 16 +++-