From owner-freebsd-questions Thu Mar 21 01:43:10 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id BAA12146 for questions-outgoing; Thu, 21 Mar 1996 01:43:10 -0800 (PST) Received: from shell.aros.net (shell.aros.net [205.164.111.19]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id BAA12137 for ; Thu, 21 Mar 1996 01:43:03 -0800 (PST) Received: (from angio@localhost) by shell.aros.net (8.7.5/Unknown) id CAA03086; Thu, 21 Mar 1996 02:44:57 -0700 (MST) From: Dave Andersen Message-Id: <199603210944.CAA03086@shell.aros.net> Subject: Re: Shared Memory Question To: 103350.3250@compuserve.com (Weston Ruch) Date: Thu, 21 Mar 1996 02:44:57 -0700 (MST) Cc: questions@freebsd.org In-Reply-To: <960321032138_103350.3250_JHL113-1@CompuServe.COM> from Weston Ruch at "Mar 20, 96 10:21:39 pm" X-Mailer: ELM [version 2.4ME+ PL13 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk *ponder* If you're getting a segfault, something sounds wrong. The way to change how much shared memory you can have is by putting the options "SHMMAXPGS=XXXX" (in K blocks) in your kernel config file. However, the problem from that should arise when you try to allocate the shared memory -- it should fail and return an error number to you in a very polite fashion, not segfault. (Unfortunatly, I haven't used enough of it to really say what *is* happening. :) -Dave Andersen Lo and behold, Weston Ruch once said: > I'm wondering if there is a problem with the shared memory implementation in > FreeBSD 2.1. > > There is no problem when the shared memory segment is small. I've tested it > extensively with 1 Kilobyte shared memory segments and everything is fine. > > But problems occur when I try to utilize large shared memory segments. When > writing to the segment, the program always terminates due to an invalid memory > reference. For example, when a 32 Kbyte segment is utilized, a SIGSEGV signal > is encountered when writing to address 0x80b2000. When writing to a 64 Kbyte > segment, the seg fault occurs at 0x80ba000. > > The system always allocates the memory at or about these address ranges and its > no problem when shared memory segments are about 1 Kbyte. I don't quite > understand the addresses though, since the former address corresponds to 127 > Mbytes, and the latter corresponds to 128 Mbytes and I don't have nearly that > much memory or swap space. > > When I look at the core file for 32 Kbyte case in the debugger, the above > addresses are verified, but it also states that the program had difficulty > writing to address 0x7453203a, and I don't doubt it. > > I believe that either the kernel needs to be configured for more kernel memory > (but there doesn't seem to be a parameter to do this), or perhaps there is a > problem in the implementation. > > I hope I've described the situation adequately. Thanks for any info regarding > this matter. > > Best Regards, > > Weston Ruch > -- angio@aros.net Complete virtual hosting and business-oriented system administration Internet services. (WWW, FTP, email) http://www.aros.net/ http://www.aros.net/about/virtual/ "There are only two industries that refer to thier customers as 'users'."