linux-user: init_guest_space: Don't try to align if we'll reject it
If the ensure-alignment code gets triggered, then the
"if (host_start && real_start != current_start)" check will always trigger,
so save 2 syscalls and put that check first.
Note that we can't just switch to using MAP_FIXED for that check, because
then we couldn't differentiate between a failure because "there isn't
enough space" and "there isn't enough space *here*".
Signed-off-by: Luke Shumaker <[email protected]>
Message-Id: <
20171228180814[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Laurent Vivier <[email protected]>