On 24 July 2014 19:31, Marc Marí <[email protected]> wrote:
> Signed-off-by: Paolo Bonzini <[email protected]>
> Signed-off-by: Marc Marí <[email protected]>
> ---
> tests/libqos/malloc-pc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/libqos/malloc-pc.c b/tests/libqos/malloc-pc.c
> index db1496c..2efd095 100644
> --- a/tests/libqos/malloc-pc.c
> +++ b/tests/libqos/malloc-pc.c
> @@ -36,7 +36,7 @@ static uint64_t pc_alloc(QGuestAllocator *allocator, size_t
> size)
>
>
> size += (PAGE_SIZE - 1);
> - size &= PAGE_SIZE;
> + size &= -PAGE_SIZE;
Do we have access to the osdep.h ROUND_UP macro from libqos?
If so, we could replace these two lines with
size = ROUND_UP(size, PAGE_SIZE);
thanks
-- PMM