mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 05:51:53 -06:00
memfd: split qemu_memfd_alloc()
Add a function to only create a memfd, without mmap. The function is used in the following memory backend. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20171023141815.17709-2-marcandre.lureau@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
3e5bdc6573
commit
dcff1035df
2 changed files with 37 additions and 25 deletions
|
@ -16,6 +16,7 @@
|
|||
#define F_SEAL_WRITE 0x0008 /* prevent writes */
|
||||
#endif
|
||||
|
||||
int qemu_memfd_create(const char *name, size_t size, unsigned int seals);
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue