kenbo@iris.com writes:
> Christoph Rohland <cr@sap.com> writes:
>
> > #include <sys/types.h>
> > #include <linux/shm.h>
>
> > main()
> > {
> > printf ("shmmax = %d\n", SHMMAX);
> > }
> >
> > Works for me.
>
> > BTW it is probably much better to check the runtime settings with
> > shmctl(0, SHM_INFO, ...). The limits are all tuneable now.
>
> The only problem with shmctl SHM_INFO is that it gives you
> information about the shared memory in use, not about the limits;
> IPC_INFO looks promising, but I cannot get that to compile for
> reasons similar to the test case. Maybe it's something with my
> setups or my system somehow because even the above test case fails -
> I'm running base Redhat 6.0 system with the 2.3.99pre5 patched to
> pre6-6 kernel and I get the following messages on this test case
> (and /usr/src/linux points to the new kernel); I tried it on another
> box with RH 6.1 and 2.3.99pre5 kernel and I get the same results:
O.K. I stand corrected in both cases:
- The test proggy does _not_ compile. (I tested on the wrong
machine :-(
- You have to use IPC_INFO, not SHM_INFO.
The attached patch should fix this.
Greetings
Christoph
--- include/linux/shm.h~ Thu Apr 27 16:04:21 2000
+++ include/linux/shm.h Fri Apr 28 09:37:50 2000
@@ -2,7 +2,7 @@
#define _LINUX_SHM_H_
#include <linux/ipc.h>
-#include <linux/mm.h>
+#include <asm/page.h> /* for PAGESIZE */
/*
* SHMMAX, SHMMNI and SHMALL are upper limits are defaults which can
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:14 EST