mmap() and SysV shared memory on DecStation 3100...

George Robbins grr at cbmvax.UUCP
Mon Jun 12 04:52:43 AEST 1989


In article <6514 at oxtrap.UUCP> time at oxtrap.UUCP (Tim Endres) writes:
> Thank you to several who replied to my mmap() question.
> 
> The question now: How can we get a 4Meg System V shared memory segment?
> 
> Our shared memory needs are 4 Megabytes. We could break the segment up
> but the re-write is too costly right now. Someone at Dec indicated that
> the limit on the size of SysV shared memory segments is configurable.

The following items in the /sys/h/param.h include file control the
shared memory configuration.  You can override the default values by
putting control lines in your config file, /sys/conf/YOURSYSTEM.
There are no obvious hard limits but some common sense is advised,
and the numbers must fit the shared memory segments between the
top of the amount of memory occupied by your largest text/data
segment plus as much memory as it malloc's and the bottom of the
stack...

*****  the following numbers are vax stuff, check if 3100 is different! *****

from (loosely) /sys/h/param.h:

/*
 * SMMAX, SMMIN and SMBRK are 512 byte pages.  SMMAX is rounded up to bytes
 * on a cluster boundary.  SMMIN is truncated down to bytes on a cluster
 * boundary.  SMBRK is rounded up to a cluster boundary.
 */

#define	SMSEG	6	/* number of segments per process */
#define	SMMAX	256	   /* Max SM segment size (512 byte pages) */
#define	SMMIN	0	   /* Min SM segment size (512 byte pages) */
#define	SMBRK	64	   /* separation between end of data and
			      beginning of SM segments (512 byte pages) */
#define	MAXSMAT	(SMSMAT*1024*1024) /* highest shared memory attach addr
					( in meg ) */


lines in /sys/conf/YOURSYSTEM for "default values":

smmax	256
smmin	0
smbrk	64
smseg	6
smsmat	21	# approximate

As usual, just because you can change them, there is no guarantee that
something won't break if you choose imaginative values.

Note that 'smmax 256' should be  roughly equivalent to 'options "SMMAX=256"'
if you are inclined to play with things that aren't hardwired into /etc/config.

-- 
George Robbins - now working for,	uucp: {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing	arpa: cbmvax!grr at uunet.uu.net
Commodore, Engineering Department	fone: 215-431-9255 (only by moonlite)



More information about the Comp.unix.ultrix mailing list