When moving from KB to B for the default page size we must always use size_to_smaller_unit in case we overflow.
Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugeutils.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hugeutils.c b/hugeutils.c index ae60f39..abcf29f 100644 --- a/hugeutils.c +++ b/hugeutils.c @@ -241,7 +241,7 @@ static int select_pool_counter(unsigned int counter, unsigned long pagesize, * read /proc/meminfo. */ default_size = file_read_ulong(MEMINFO, "Hugepagesize:"); - default_size *= 1024; /* Convert from kB to B */ + default_size = size_to_smaller_unit(default_size); /* kB to B */ if (default_size < 0) { ERROR("Cannot determine the default page size\n"); return -1; -- 1.6.0.2.711.gf1ba4 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel