From: <gb...@di...> - 2001-06-22 08:17:14
|
Hi, > 2) Sounds like you have had more success than I. > I wasn't able to use _any_ mmap() calls under OS X. > (it always gives an errno that says the function is unimplemented) Indeed, mmap() does not work when you specify a file to map from. Instead, simply add MAP_ANON to the list of flags and set the file descriptor to -1. > 3) You may want to investigate the map_fd(), vm_allocate() and > vm_deallocate() calls in this old Rhapsody (NextStep) document: Thanks, I have just added those system calls. Unfortunately, B2 still crash in some select() in either implementation (vm_allocate() or mmap()). I thought it may be due to the select() call in Delay_usec() but turning the select() to an usleep() still makes B2 to crash. Actually, as I supposed earlier, the crashing behavior appears when VOSF is enabled (use_vosf =3D true in video_x.cpp). That may be due to some combination of signal/sigsegv handler/vm_protect/... VideoRefresh() didn't have a chance to get called. Instead, the screen remains black and logging shows me that only a few pages get unprotected before crashing in supposedly select(), ... on a branch instruction!? As a temporary workaround, I think i will disable VOSF in Darwin but still do direct addressing. That works and provides an interesting speedup (15-25%). > > Note: vm_protect() exists in Mach/Darwin environments but with 4 > > arguments. This is not a problem since we use C++. Could this be a > > problem for Objective C if Nigel wants to have the same naming > > conventions ? >=20 > Won't be a problem, as my MacOS X port currently doesn't use > main_unix.cpp anyway. (most of its stuff is in cpp_glue_MacOSX.cpp) OK. BTW, is it advanced enough now so that it could be integrated into CVS ? Bye; Gwenol=E9. |