mirror of
https://github.com/mii443/qemu.git
synced 2025-09-03 07:39:26 +00:00
util: add memfd helpers
Add qemu_memfd_alloc/free() helpers. The function helps to allocate and seal shared memory. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Thibaut Collet <thibaut.collet@6wind.com>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
f04cf9239a
commit
d3592199ba
@ -17,4 +17,8 @@
|
||||
#define F_SEAL_WRITE 0x0008 /* prevent writes */
|
||||
#endif
|
||||
|
||||
void *qemu_memfd_alloc(const char *name, size_t size, unsigned int seals,
|
||||
int *fd);
|
||||
void qemu_memfd_free(void *ptr, size_t size, int fd);
|
||||
|
||||
#endif /* QEMU_MEMFD_H */
|
||||
|
Reference in New Issue
Block a user