making memory map a sorted array helps to simplify and speed up lookup/insertion and deletion ops on it. It also makes insertion/deteletion code easier to read.
Igor Mammedov (4): vhost: codding style fix tab indents vhost: simplify/speedify vhost_dev_assign_memory() vhost: switch region lookup from linear to bsearch vhost: simplify/speedify vhost_dev_unassign_memory() hw/virtio/vhost.c | 252 ++++++++++++++++++++++++++---------------------------- 1 file changed, 123 insertions(+), 129 deletions(-) -- 1.8.3.1