diff options
author | Kevin Wolf <kwolf@redhat.com> | 2014-05-20 12:24:05 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-08-15 15:07:15 +0200 |
commit | 7d2a35cc921ea4832083a7e8598461868bb538ce (patch) | |
tree | 0aabab68f9ae59485bba04d9fe374ed0e603af1e /include/qemu | |
parent | 23d20b5b4fb7bde102e6779b7a13b88375e4db66 (diff) | |
download | qemu-7d2a35cc921ea4832083a7e8598461868bb538ce.zip qemu-7d2a35cc921ea4832083a7e8598461868bb538ce.tar.gz qemu-7d2a35cc921ea4832083a7e8598461868bb538ce.tar.bz2 |
block: Introduce qemu_try_blockalign()
This function returns NULL instead of aborting when an allocation fails.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/osdep.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 8480d52..9dd43fc 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -95,6 +95,7 @@ typedef signed int int_fast16_t; #define qemu_printf printf int qemu_daemon(int nochdir, int noclose); +void *qemu_try_memalign(size_t alignment, size_t size); void *qemu_memalign(size_t alignment, size_t size); void *qemu_anon_ram_alloc(size_t size); void qemu_vfree(void *ptr); |