On Thu, Feb 27, 2020 at 11:12:03AM +0100, David Hildenbrand wrote: > Introduce qemu_anon_ram_alloc_resizeable() and qemu_anon_ram_resize(). > Implement them under POSIX and make them return NULL under WIN32. > > Under POSIX, we make use of resizeable mmaps. An implementation under > WIN32 is theoretically possible AFAIK and can be added later. > > In qemu_anon_ram_free(), rename the size parameter to max_size, to make > it clearer that we have to use the maximum size when freeing resizeable > anonymous allocations. > > Cc: Richard Henderson <r...@twiddle.net> > Cc: Paolo Bonzini <pbonz...@redhat.com> > Cc: "Dr. David Alan Gilbert" <dgilb...@redhat.com> > Cc: Eduardo Habkost <ehabk...@redhat.com> > Cc: Marcel Apfelbaum <marcel.apfelb...@gmail.com> > Cc: Stefan Weil <s...@weilnetz.de> > Cc: Igor Mammedov <imamm...@redhat.com> > Signed-off-by: David Hildenbrand <da...@redhat.com>
Reviewed-by: Peter Xu <pet...@redhat.com> -- Peter Xu