Re: [linux-audio-dev] shared memory problems

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] shared memory problems
From: Paul Davis (pbd_AT_Op.Net)
Date: Sun Nov 11 2001 - 01:59:51 EET


i figured out what was wrong.

if you call shmat(2) or mmap(2) with a specific address, the kernel
assumes that you know what you're doing and unmaps anything thats
already mapped there.

i was trying to force the same address for a given segment in two
different processes, and in one of them, we several libraries mapped
at that location.

if shmat (id, 0, 0) did what the man page suggests, which is to find a
space working backwards from the top of a 1.5GB address range, this
would be (nearly always) OK. but the kernel just calls
get_unmapped_area(), which finds the first hole it can (this is in the
JACK server). when that address is used in a JACK client with a GUI or
other libs linked in, its likely to be right in the middle of the
library mappings.

i've kludged around this for now and am pressing on with other issues.

oh, for those who care, spiral loops looked too tricky for a first
pass, mostly because i don't know fltk well enough to know about some
subtleties. i chose rythmnlab instead, and ended up almost completely
rewriting it (not entirely for reasons relating to JACK).

--p


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sun Nov 11 2001 - 01:59:55 EET