mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06: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:
parent
f04cf9239a
commit
d3592199ba
2 changed files with 75 additions and 1 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue