mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
Don't abort on memory allocation error
It is better to fail migration in case of failure to allocate new cache item Signed-off-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
a17b2fd358
commit
89db9987c0
3 changed files with 17 additions and 7 deletions
|
@ -60,11 +60,13 @@ uint8_t *get_cached_data(const PageCache *cache, uint64_t addr);
|
|||
* cache_insert: insert the page into the cache. the page cache
|
||||
* will dup the data on insert. the previous value will be overwritten
|
||||
*
|
||||
* Returns -1 on error
|
||||
*
|
||||
* @cache pointer to the PageCache struct
|
||||
* @addr: page address
|
||||
* @pdata: pointer to the page
|
||||
*/
|
||||
void cache_insert(PageCache *cache, uint64_t addr, uint8_t *pdata);
|
||||
int cache_insert(PageCache *cache, uint64_t addr, uint8_t *pdata);
|
||||
|
||||
/**
|
||||
* cache_resize: resize the page cache. In case of size reduction the extra
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue