mirror of https://github.com/xemu-project/xemu.git
exec: use macro ROUND_UP for alignment
Use ROUND_UP instead. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> Message-Id: <1437707523-4910-1-git-send-email-chenhanxiao@cn.fujitsu.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
c097a60b10
commit
9284f31994
2
exec.c
2
exec.c
|
@ -1210,7 +1210,7 @@ static void *file_ram_alloc(RAMBlock *block,
|
||||||
unlink(filename);
|
unlink(filename);
|
||||||
g_free(filename);
|
g_free(filename);
|
||||||
|
|
||||||
memory = (memory+hpagesize-1) & ~(hpagesize-1);
|
memory = ROUND_UP(memory, hpagesize);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ftruncate is not supported by hugetlbfs in older
|
* ftruncate is not supported by hugetlbfs in older
|
||||||
|
|
Loading…
Reference in New Issue