Re: Is shared memory now only for use by the kernel in 2.3.x????

From: Christoph Rohland (cr@sap.com)
Date: Thu Apr 27 2000 - 12:53:07 EST


kenbo@iris.com writes:

> Using 2.3.99pre6-6, I noticed that SHMMAX has been moved to linux/shm.h and
> that this file is only useable if you have __KERNEL__ defined, otherwise
> the headers it includes basically blow up due to symbols such as kdev_t not
> getting defined. Was this on purpose? If not, maybe we can fix this,
> because otherwise app builders using shared memory and trying to honor
> system boundaries are going to have some problems.

#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.

Greetings
                Christoph

-
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:13 EST