From owner-freebsd-hackers Wed Nov 29 13:17:12 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id NAA21148 for hackers-outgoing; Wed, 29 Nov 1995 13:17:12 -0800 Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id NAA21128 for ; Wed, 29 Nov 1995 13:16:21 -0800 Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id OAA28629; Wed, 29 Nov 1995 14:10:48 -0700 From: Terry Lambert Message-Id: <199511292110.OAA28629@phaeton.artisoft.com> Subject: Re: Increasing size of shared memory segmenty To: taob@io.org (Brian Tao) Date: Wed, 29 Nov 1995 14:10:47 -0700 (MST) Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: from "Brian Tao" at Nov 28, 95 09:53:04 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1228 Sender: owner-hackers@FreeBSD.ORG Precedence: bulk > 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.