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:
Chen Hanxiao 2015-07-24 11:12:03 +08:00 committed by Paolo Bonzini
parent c097a60b10
commit 9284f31994

2
exec.c
View file

@ -1210,7 +1210,7 @@ static void *file_ram_alloc(RAMBlock *block,
unlink(filename);
g_free(filename);
memory = (memory+hpagesize-1) & ~(hpagesize-1);
memory = ROUND_UP(memory, hpagesize);
/*
* ftruncate is not supported by hugetlbfs in older