Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Nov 1995 14:10:47 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        taob@io.org (Brian Tao)
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Increasing size of shared memory segmenty
Message-ID:  <199511292110.OAA28629@phaeton.artisoft.com>
In-Reply-To: <Pine.BSF.3.91.951128214607.26419F-100000@flinch> from "Brian Tao" at Nov 28, 95 09:53:04 pm

next in thread | previous in thread | raw e-mail | index | archive | help
>     In the course of playing with the gimp image editor (see the
> freebsd-ports list if you don't know what this is), I keep bumping
> into the 4-megabyte shared memory segment limit.  What is the best way
> to increase this size?  Define SHMMAX in the kernel config file?  Or
> SHMALL or SHMMAXPGS?  The gimp documentation suggests a 32-megabyte
> segment size.

You can bump the max pages in a segment.  Be aware that the kernel
address space is limited, and is further restricted above and beyond
what you'd expect by the vm/buffer cache unification.  There is not
a mechanism for windowed access to large files.

Typically, you'd want to have windowed access to large files to overcome
the mmap limit instead of using a direct map, coupled with the use of a
real vode with a single reference count (the mapping) to implement the
shared memory segments.  This would allow them to be arbitrary sized and
fault referenced.

32M is smaller than the overall limit, (36 bits?  39 bits?) so you should
be safe, though if you have several of these, you will probably start
having problems.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511292110.OAA28629>