On Sun, 24 Jul 2005 12:56:51 +0100, Marc-Antoine Parent wrote (in message <[EMAIL PROTECTED]>):
> You seem to be right, shm_open works but I could not manage to mmap > to the resulting fd. What the mozart tests use for shm, btw, is not > shm_open but shmget. I tried to use those in the program you sent me > and the results are fine. And that should be posixy too; try it on > your SysV machine. > > > > Oh, I just saw this thread: > http://lists.apple.com/archives/Darwin-kernel/2005/Feb/msg00076.html > They got shm_open to work, read the thread through... But it's not > pretty! > Basically you have to call ftruncate before mmap, but only when you > first create the thread; after that, unlink in one processes creates > issues for the next process. Sigh. > Marc-Antoine Thanks for that - reading the thread through seems to indicate that it is possible to get it working... The posix API seemed rather better than SysV but it would appear to have at least as many gotchas at least on Darwin - I'm not clear if the file mapped memory works - the early comment seems to indicate not and someone claimed that sysV shm was problematic on Darwin (no details) but this is not my experience - seems to work fine with largish segments. So I'll give it a shot. Thanks for your research it has cleared things up enough to have another go at posix. I'll check portabilty across to windows and linux also. Re: gcc optimizations on ppc - I'm not sure what the impact will be on Oz - but now I have seen some speed ups with my rather simple (easy to optimize) code so I'll put it on my list of things to do. I'll post the results (if they are significant) and see if defaulting to -O3 is a better option. I'll post results on hackers list. I should also compare the assembler for my routines and see if I can spot the optimization (it may be very specific). I did imagine that -fast includes -O3 optimizations in fact I'm sure I read that in the gcc pages, so this was unexpected and maybe another happy accident. Cheers, Simon _________________________________________________________________________________ mozart-users mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-users
