]> git.proxmox.com Git - mirror_qemu.git/commit - util/mmap-alloc.c
exec: factor out duplicate mmap code
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 24 Sep 2015 11:41:17 +0000 (14:41 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 21 Oct 2015 06:24:44 +0000 (09:24 +0300)
commit794e8f301a17953efa78ab7538019ec43c59e82a
tree99efbb84259d79552bd700c58242f6350b88efd2
parent7df953bd456da45f761064974820ab5c3fd7b2aa
exec: factor out duplicate mmap code

Anonymous and file-backed RAM allocation are now almost exactly the same.

Reduce code duplication by moving RAM mmap code out of oslib-posix.c and
exec.c.

Reported-by: Marc-André Lureau <mlureau@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Thibaut Collet <thibaut.collet@6wind.com>
exec.c
include/qemu/mmap-alloc.h [new file with mode: 0644]
util/Makefile.objs
util/mmap-alloc.c [new file with mode: 0644]
util/oslib-posix.c