Date: Tue, 10 Dec 1996 08:07:39 -0600 From: "Eric L. Hernes" <erich@lodgenet.com> To: dyson@FreeBSD.ORG Cc: erich@lodgenet.com (Eric L. Hernes), scrappy@hub.org, hackers@FreeBSD.ORG Subject: Re: Multiple Buffer allocation of Shared Memory Message-ID: <199612101407.IAA05255@jake.lodgenet.com> In-Reply-To: Your message of "Mon, 09 Dec 1996 21:38:50 EST." <199612100238.VAA27569@dyson.iquest.net>
next in thread | previous in thread | raw e-mail | index | archive | help
"John S. Dyson" writes: >> >> 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. >> >FreeBSD, NetBSD, and OpenBSD have a low level implementation of the >SYSVSHM stuff (not based on mmap, but on some of the low level kernel primativ >es >that are also used to implement mmap.) > yea, I know that, but there are some programs (gimp) that use gobs of shared memory, at some point you'll run out and have to build a new kernel. The right answer is to get the authors to fix their program. A slightly uglier solution would be to #include a hacked up <ipc.h> and <shm.h> that would use a wrapper to mmap, then it's only a application re-compile instead of a kernel/reboot. Another thing I'd be mildly interested in is /kern/sysv/shm/<ID> that is mmap()able. Although I don't think that would gain any functionality, it might even be wandering close to something linux would try... but you could get the equivalent of `ipcs' from `ls /kern/sysv/*' >> >> 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. >> >The limits on FreeBSD are totally administrative, and so if you need to >increase SHMMAXPGS or somesuch, there is little cost. > Are there any big obstacles to making this totally dynamic? >John >dyson@freebsd.org eric. -- erich@lodgenet.com http://rrnet.com/~erich erich@rrnet.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612101407.IAA05255>