projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c097a60
)
exec: use macro ROUND_UP for alignment
author
Chen Hanxiao
<chenhanxiao@cn.fujitsu.com>
Fri, 24 Jul 2015 03:12:03 +0000
(11:12 +0800)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Fri, 14 Aug 2015 21:40:32 +0000
(23:40 +0200)
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>
exec.c
patch
|
blob
|
history
diff --git
a/exec.c
b/exec.c
index 0a4a0c5af663865df12adb5026a7cd864f350416..54cd70ac1e0bc47af889b6c93224b9e783fd637e 100644
(file)
--- a/
exec.c
+++ b/
exec.c
@@
-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