gasp_find_free_range()

Find a free region of a particular space type inside a specified address range

Synopsis:

#include <qvm/gasp.h>
uint64_t gasp_find_free_range(const struct guest_system *gsp,
                              unsigned qst,
                              uint64_t size,
                              uint64_t align,
                              uint64_t min_addr,
                              uint64_t max_addr)

Arguments:

gsp
A pointer to the guest system being searched for a free region.
qst
QST_* macro for the space type being searched.
size
The number of bytes being requested.
align
The alignment being requested.
min_addr
The minimum acceptable address.
max_addr
The maximum acceptable address.

Library:

Provided by qvm; no external library is required.

Description:

We recommend that you lock the guest address space to ensure that no other vdev can claim the region you need before you have finished your task.

Returns:

The starting location for free space, or QSL_NO_LOCATION if nothing is available.