From 57ad6ab804cd24d6dd4a08f40f83081c393ee0b9 Mon Sep 17 00:00:00 2001 From: Steve Sistare Date: Wed, 15 Jan 2025 11:00:27 -0800 Subject: backends/hostmem-shm: factor out allocation of "anonymous shared memory with an fd" Let's factor it out so we can reuse it. Signed-off-by: David Hildenbrand Signed-off-by: Steve Sistare Reviewed-by: Peter Xu Link: https://lore.kernel.org/r/1736967650-129648-2-git-send-email-steven.sistare@oracle.com Signed-off-by: Fabiano Rosas --- include/qemu/osdep.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/qemu/osdep.h') diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index b94fb5fab8..112ebdff21 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -509,6 +509,7 @@ int qemu_daemon(int nochdir, int noclose); void *qemu_anon_ram_alloc(size_t size, uint64_t *align, bool shared, bool noreserve); void qemu_anon_ram_free(void *ptr, size_t size); +int qemu_shm_alloc(size_t size, Error **errp); #ifdef _WIN32 #define HAVE_CHARDEV_SERIAL 1 -- cgit 1.4.1