Re: Solaris7 X86 - ./configure options for GTK+-1.2.0



sanitation wrote:
> On Thu, 18 Mar 1999 16:04:59 +0100, you wrote:
> 
> >
> >You might try to put this in /etc/system:
> >
> >set shmsys:shminfo_shmmax = 0x2000000
> >set shmsys:shminfo_shmmni = 0x1000
> >set shmsys:shminfo_shmseg = 0x100
> >
> >It will take effect after reboot. Or you can change the values on a live
> >kernel with adb, but I haven't tried it.
> >That will increase various shared memory limits. The default ones on
> >Solaris are very low. Let me know if it helps.
> >
> >-- 
> Tried this. Also tried the semaphore thingys, w/o success. 
> Not sure what to try next. Maybe the egcs compiler instead of gcc. 

I think it won't help. A friend of mine had this problem with his game,
which used MIT-SHM extension and it worked with XFree, but not on Sun's
X server and not on Digital's X server on D/UX 4.0.

The right place to look into is probably the source. When you use shared
memory, you first get an shm identifier with shmget(), then you use
shmat() to attach it to your process. If this is a part of program
which uses MIT-SHM, at this point you'll call an X function (I forgot
the name) which will pass shm identifier to X server which will then
attach it to its memory space. Then your program can call shmctl(IPC_RMID)
which will destroy shm identifier associated with that shared memory
segment. Memory segment won't be destroyed with this call. The immediate
effect is only that no process can attach it to its memory space, since
the associated key will no longer exist. When all processes which
had that memory segment attached call shmdt() (or exit), the OS will
destroy the shared memory segment.

This is normally done this way because processes could crash and then
noone would destroy the shared memory segment. And this will work with
XFree perfectly. However, it won't work with Sun's X server, because
it needs a valid shm identifier as long as the client process runs.
It probably detaches and reattaches shared memory segment as it sees
fit, but I never traced the execution, so I can't tell for sure.

I use Window Maker and it's FAQ says that I should disable shm extension
if I want to use Sun's X server. I didn't do it and everything works
fine, so I never looked at the code.

I don't have working gnome, because I'm waiting for it to become ANSI
C friendly, so I can't help you with hacking the code. If you can
program in C, take one of the apps which are not working, find shmctl
with IPC_RMID, comment it out and try to run it that way. If it works,
add an inteligent handling for different X servers and make patches for
all applications, so I won't have to. :-)

-- 
 .-.   .-.    Life is a sexually transmitted disease.
(_  \ /  _)
     |        dave@srce.hr
     |        dave@fly.cc.fer.hr



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]