--- util-linux-2.13-pre4/sys-utils/ipcs.c.shmax 2005-10-18 17:04:42.000000000 +0200 +++ util-linux-2.13-pre4/sys-utils/ipcs.c 2005-10-18 17:31:28.000000000 +0200 @@ -25,6 +25,7 @@ #include #include #include +#include #include "nls.h" /* X/OPEN tells us to use for semctl() */ @@ -280,8 +280,14 @@ (unsigned long) shminfo.shmmni); printf (_("max seg size (kbytes) = %lu\n"), (unsigned long) (shminfo.shmmax >> 10)); + + /* max shmem = pagesize * shminfo.shmall / 1024 + * + * note: that "shminfo.shmall * getpagesize()" is greater than ULONG_MAX (32bit) + * it means that better is "/" before "*" or use "long long" + */ - printf (_("max total shared memory (pages) = %lu\n"), - (unsigned long) shminfo.shmall); + printf (_("max total shared memory (kbytes) = %lu\n"), + getpagesize()/1024 * (unsigned long) shminfo.shmall); printf (_("min seg size (bytes) = %lu\n"), (unsigned long) shminfo.shmmin); return;