]> git.proxmox.com Git - mirror_qemu.git/blobdiff - include/migration/page_cache.h
Don't abort on memory allocation error
[mirror_qemu.git] / include / migration / page_cache.h
index 87894fea9f11fe73337b9cec7c44995be011fabb..d156f0d398844f28b7e00275b4df23018fd480ae 100644 (file)
@@ -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