[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] safely calculate page number from maxmem
Currently we convert from maxmemkb to pages this way: pages = max_memkb >> (PAGE_SHIFT - 10) But I guess it is safer to do it like this (for more cautions and we lose nothing anyway): pages = (max_memkb + (1 << (PAGE_SHIFT-10)) - 1) >> (PAGE_SHIFT - 10) Signed-off-by Nguyen Anh Quynh <aquynh@xxxxxxxxx> $ diffstat maxmem2.patch tools/libxc/xc_linux_save.c | 2 +- xen/common/dom0_ops.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Attachment:
maxmem2.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |