From owner-freebsd-hackers Mon Dec 9 17:57:06 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id RAA23897 for hackers-outgoing; Mon, 9 Dec 1996 17:57:06 -0800 (PST) Received: from bacall.lodgenet.com (bacall.lodgenet.com [205.138.147.242]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id RAA23868 for ; Mon, 9 Dec 1996 17:56:55 -0800 (PST) Received: (from mail@localhost) by bacall.lodgenet.com (8.6.12/8.6.12) id TAA23705; Mon, 9 Dec 1996 19:56:13 -0600 Received: from garbo.lodgenet.com(204.124.123.250) by bacall via smap (V1.3) id sma023699; Mon Dec 9 19:55:43 1996 Received: from jake.lodgenet.com (jake.lodgenet.com [10.0.11.30]) by garbo.lodgenet.com (8.6.12/8.6.9) with ESMTP id TAA16187; Mon, 9 Dec 1996 19:55:56 -0600 Received: from jake.lodgenet.com (localhost [127.0.0.1]) by jake.lodgenet.com (8.8.3/8.6.12) with ESMTP id TAA00658; Mon, 9 Dec 1996 19:56:17 -0600 (CST) Message-Id: <199612100156.TAA00658@jake.lodgenet.com> X-Mailer: exmh version 1.6.9 8/22/96 To: "Marc G. Fournier" cc: hackers@FreeBSD.ORG Subject: Re: Multiple Buffer allocation of Shared Memory In-reply-to: Your message of "Mon, 09 Dec 1996 19:56:16 EST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 09 Dec 1996 19:56:17 -0600 From: "Eric L. Hernes" Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk "Marc G. Fournier" writes: > >Hi... > > Just starting to play with shared memory, and have hit a wall >that I don't know if its too be expected, or if I've screwed something >up... Shared memory is cool, SysV symantics for shared memory *suck*, if at all possible use mmap(). BSDi uses libc wrappers around mmap() for it's SysV shm stuff, but there's caveats... I'd like the wrappers, but have the real ones available too. > > Basically, I'm setting up the shared memory as: > > > The problem seems to be when 'ii == 8', the shmget() is working, >but the shmat() is failing with 'strerror()' returning with: > >---- >hub> ./client >Too many open files >cannot initialize mesgptr #8 >---- yup, from /sys/conf/param.h: #ifndef SHMSEG #define SHMSEG 8 #endif you can only have 8 shm segments by default, you can override it with: `options "SHMSEG=32"' or something similar in your config file. I usually bump SHMSEG to 128 and SHMMAXPGS to 4096. > > which is the only one that I would think is appropriate to the >situation...unless its a kernel config problem... > You got it. > >Thanks in advance... > >Marc G. Fournier scrappy@hub.org >Systems Administrator @ hub.org scrappy@freebsd.org > > eric. -- erich@lodgenet.com http://rrnet.com/~erich erich@rrnet.com