On Thu, Jan 28, 2010 at 1:16 AM, Bret S. Lambert <blamb...@openbsd.org> wrote: > On Wed, Jan 27, 2010 at 06:55:29PM -0500, Ted Unangst wrote: >> Shm shouldn't be mapped in the kernel, so large values won't be that >> bad. > > But the way that shared mem is implemented means that larger > values require a larger malloc(9), which can increase the > pressure on kva space, which can panic your machine; in > fact, there was someone asking about this on misc@ not too > long ago. Changing this to a better data structure is on > my list of things to (eventually) do.
That's on the order of number of segments, though, not the allowed space. And the structures are small, even 50k segments shouldn't pose a problem, and you shouldn't ever need anywhere close to that many. Unless I've missed something?