19 lines
809 B
Diff
19 lines
809 B
Diff
--- 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
|
|
@@ -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 (kbytes) = %lu\n"),
|
|
- (getpagesize()*((unsigned long) shminfo.shmall))/1024UL);
|
|
+ getpagesize()/1024 * (unsigned long) shminfo.shmall);
|
|
printf (_("min seg size (bytes) = %lu\n"),
|
|
(unsigned long) shminfo.shmmin);
|
|
return;
|